feat(web): add lightweight workspace matching existing UI
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/** Marked uses at() internally, including on Chromium-based readers predating it. */
|
||||
export function installLiteCompatibility() {
|
||||
if (!("at" in Array.prototype)) {
|
||||
Object.defineProperty(Array.prototype, "at", {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: function at(this: unknown[], index: number) {
|
||||
const offset = Math.trunc(Number(index)) || 0;
|
||||
const position = offset < 0 ? this.length + offset : offset;
|
||||
return position < 0 || position >= this.length ? undefined : this[position];
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user