parent
0531369613
commit
04eac3e7c5
1 changed files with 1 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ export function repl({
|
||||||
// set pattern methods that use this repl via closure
|
// set pattern methods that use this repl via closure
|
||||||
const injectPatternMethods = () => {
|
const injectPatternMethods = () => {
|
||||||
Pattern.prototype.p = function (id) {
|
Pattern.prototype.p = function (id) {
|
||||||
if (id.startsWith('_') || id.endsWith('_')) {
|
if (typeof id === 'string' && (id.startsWith('_') || id.endsWith('_'))) {
|
||||||
// allows muting a pattern x with x_ or _x
|
// allows muting a pattern x with x_ or _x
|
||||||
return silence;
|
return silence;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue