Skip to content

Commit 9e0e0fa

Browse files
committed
1 parent 91121a4 commit 9e0e0fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ Iterator.prototype.compile = function(expr) {
267267
case 'number':
268268
return function(node) { return expr == node.nodeType; };
269269
case 'string':
270-
return new Function('node', 'return ' + props(expr, 'node.'));
270+
return new Function('node', 'Object.freeze(node); return ' + props(expr, 'node.'));
271271
case 'function':
272272
return expr;
273273
default:

0 commit comments

Comments
 (0)