This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -623,7 +623,7 @@ function isStateless($filter, filterName) {
623
623
}
624
624
625
625
// Detect nodes which could depend on non-shallow state of objects
626
- function isPure ( node , parentPureness ) {
626
+ function isPure ( node , parentIsPure ) {
627
627
switch ( node . type ) {
628
628
// Computed members might invoke a stateful toString()
629
629
case AST . MemberExpression :
@@ -632,6 +632,7 @@ function isPure(node, parentPureness) {
632
632
}
633
633
break ;
634
634
635
+ // Unary always convert to primative
635
636
case AST . UnaryExpression :
636
637
return true ;
637
638
@@ -644,15 +645,15 @@ function isPure(node, parentPureness) {
644
645
return false ;
645
646
}
646
647
647
- return parentPureness ;
648
+ return ( undefined === parentIsPure ) || parentIsPure ;
648
649
}
649
650
650
651
function findConstantAndWatchExpressions ( ast , $filter , parentIsPure ) {
651
652
var allConstants ;
652
653
var argsToWatch ;
653
654
var isStatelessFilter ;
654
655
655
- ast . isPure = parentIsPure = isPure ( ast , ( undefined === parentIsPure ) || parentIsPure ) ;
656
+ ast . isPure = parentIsPure = isPure ( ast , parentIsPure ) ;
656
657
657
658
switch ( ast . type ) {
658
659
case AST . Program :
You can’t perform that action at this time.
0 commit comments