fix: "can't redefine non-configurable property"
This commit is contained in:
parent
aa1b9d11dc
commit
18ae82174d
1 changed files with 3 additions and 1 deletions
|
|
@ -88,16 +88,18 @@ export function repl({
|
||||||
get() {
|
get() {
|
||||||
return this.p(i);
|
return this.p(i);
|
||||||
},
|
},
|
||||||
|
configurable: true,
|
||||||
});
|
});
|
||||||
Object.defineProperty(Pattern.prototype, `p${i}`, {
|
Object.defineProperty(Pattern.prototype, `p${i}`, {
|
||||||
get() {
|
get() {
|
||||||
return this.p(i);
|
return this.p(i);
|
||||||
},
|
},
|
||||||
|
configurable: true,
|
||||||
});
|
});
|
||||||
Pattern.prototype[`q${i}`] = silence;
|
Pattern.prototype[`q${i}`] = silence;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// already defined..
|
console.warn('injectPatternMethods: error:', err);
|
||||||
}
|
}
|
||||||
|
|
||||||
evalScope({
|
evalScope({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue