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
return (calculateObj() as any)[key];
},
set() {
console.error("Layers and features are shallow readonly");
set(target, key, value) {
console.error("Layers and features are shallow readonly", key, value);
return false;
},
has(target, key) {