Skip to content

Commit b86e7e9

Browse files
committed
Don’t compute unreachable outputs.
1 parent 5f36141 commit b86e7e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/runtime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function runtime_computeNow() {
112112
variable._indegree = 0;
113113
variable._outputs.forEach(variables.add, variables);
114114
} else {
115-
variable._indegree = -1;
115+
variable._indegree = NaN;
116116
variables.delete(variable);
117117
}
118118
});

src/variable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function Variable(type, module, observer) {
1717
_definition: {value: variable_undefined, writable: true},
1818
_duplicate: {value: undefined, writable: true},
1919
_duplicates: {value: undefined, writable: true},
20-
_indegree: {value: -1, writable: true}, // The number of computing inputs.
20+
_indegree: {value: NaN, writable: true}, // The number of computing inputs.
2121
_inputs: {value: [], writable: true},
2222
_invalidate: {value: noop, writable: true},
2323
_module: {value: module},

0 commit comments

Comments
 (0)