diff --git a/src/routes/+layout.js b/src/routes/+layout.js index ec2cafd8..e55dd8a6 100644 --- a/src/routes/+layout.js +++ b/src/routes/+layout.js @@ -11,21 +11,21 @@ globalThis.process = process // Shims // import shimArrayPrototypeGroup from 'array.prototype.group' -// import shimArrayPrototypeGroupToMap from 'array.prototype.grouptomap' +import shimArrayPrototypeGroupToMap from 'array.prototype.grouptomap' // shimArrayPrototypeGroup.shim() -// shimArrayPrototypeGroupToMap.shim() - -Array.prototype.groupToMap ||= function(callbackFn, _this = this){ - const map = new Map() - for (const item of _this) { - const key = callbackFn(item) - const group = map.get(key) || [] - group.push(item) - map.set(key, group) - } - return map -} +shimArrayPrototypeGroupToMap.shim() + +// Array.prototype.groupToMap ||= function(callbackFn, _this = this){ +// const map = new Map() +// for (const item of _this) { +// const key = callbackFn(item) +// const group = map.get(key) || [] +// group.push(item) +// map.set(key, group) +// } +// return map +// } // SvelteKit