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() {
|
||||
return this.p(i);
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
Object.defineProperty(Pattern.prototype, `p${i}`, {
|
||||
get() {
|
||||
return this.p(i);
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
Pattern.prototype[`q${i}`] = silence;
|
||||
}
|
||||
} catch (err) {
|
||||
// already defined..
|
||||
console.warn('injectPatternMethods: error:', err);
|
||||
}
|
||||
|
||||
evalScope({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue