-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Infinite loop in circular computeds #1943
Copy link
Copy link
Closed
Milestone
Description
It looks like computeds are prone to a circular dirtying loop as demonstrated by:
ko.options.deferUpdates = true;
a = ko.observable();
b = ko.computed({ read : function() { a(); return d(); }, deferEvaluation : true });
d = ko.computed({ read : function() { a(); return b(); }, deferEvaluation : true });
d();
a('something');
This will crap out with a "Maximum call stack size exceeded". Looks like it's not the evaluation of them but the scheduling for re-evaluation,
Tested with KO 3.4.
Reactions are currently unavailable