MCPcopy
hub / github.com/microsoft/SandDance / _warnDuplicateIcon

Function _warnDuplicateIcon

docs/app/js/sanddance-app.js:28122–28134  ·  view source on GitHub ↗
(iconName)

Source from the content-addressed store, hash-verified

28120var _missingIcons = [];
28121var _missingIconsTimer = undefined;
28122function _warnDuplicateIcon(iconName) {
28123 var options = _iconSettings.__options;
28124 var warningDelay = 2000;
28125 var maxIconsInMessage = 10;
28126 if (!options.disableWarnings) {
28127 _missingIcons.push(iconName);
28128 if (_missingIconsTimer === undefined) _missingIconsTimer = setTimeout(function() {
28129 (0, _utilities.warn)("Some icons were re-registered. Applications should only call registerIcons for any given icon once. Redefining what an icon is may have unintended consequences. Duplicates include: \n" + _missingIcons.slice(0, maxIconsInMessage).join(", ") + (_missingIcons.length > maxIconsInMessage ? " (+ " + (_missingIcons.length - maxIconsInMessage) + " more)" : ""));
28130 _missingIconsTimer = undefined;
28131 _missingIcons = [];
28132 }, warningDelay);
28133 }
28134}
28135
28136},{"tslib":"01Tx1","@uifabric/utilities":"uTCgd","@uifabric/merge-styles":"7c43M","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"3Atdm":[function(require,module,exports) {
28137var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");

Callers 1

registerIconsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected