Print key and value in lazy proxy's setter error message

This commit is contained in:
thepaperpilot 2022-03-31 22:48:11 -05:00
parent fdd62d6e09
commit af9b2a8d19

View file

@ -36,8 +36,8 @@ export function createLazyProxy<T extends object>(objectFunc: () => T): T {
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
return (calculateObj() as any)[key]; return (calculateObj() as any)[key];
}, },
set() { set(target, key, value) {
console.error("Layers and features are shallow readonly"); console.error("Layers and features are shallow readonly", key, value);
return false; return false;
}, },
has(target, key) { has(target, key) {