Skip to content

Commit

Permalink
Ensure that the OperatorList constructor actually initializes a `Nu…
Browse files Browse the repository at this point in the history
…llOptimizer` when intended (PR 9089 follow-up)

It appears that this has been broken ever since PR 9089, which also introduced this code, since the `QueueOptimizer`/`NullOptimizer` choice was made based on the still undefined `this.intent` property.

Furthermore, fixing this also uncovered the fact that the `NullOptimizer.reset` method was missing.
  • Loading branch information
Snuffleupagus committed May 2, 2019
1 parent f87dc42 commit 96942d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/operator_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ var NullOptimizer = (function NullOptimizerClosure() {
},

flush() { },

reset() { },
};

return NullOptimizer;
Expand All @@ -538,7 +540,7 @@ var OperatorList = (function OperatorListClosure() {
this.messageHandler = messageHandler;
this.fnArray = [];
this.argsArray = [];
if (messageHandler && this.intent !== 'oplist') {
if (messageHandler && intent !== 'oplist') {
this.optimizer = new QueueOptimizer(this);
} else {
this.optimizer = new NullOptimizer(this);
Expand Down

0 comments on commit 96942d4

Please sign in to comment.