Skip to content

Commit c0b9643

Browse files
committed
feat(operator): optimize inVector check
1 parent 6d749a4 commit c0b9643

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/operator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function operatorCalc(alg, result) {
2626
resultCacheIndex = -1;
2727
const x = alg();
2828

29-
if (!result && !inVector) {
29+
if (!result && typeof inVector === 'undefined') {
3030
return x;
3131
}
3232
inProgress = Y;
@@ -59,7 +59,7 @@ export function cachedValueOf(Vector) {
5959
const org = Vector.prototype[name];
6060
Vector.prototype[name] = function () {
6161
if (inProgress === X) {
62-
if (!inVector) {
62+
if (typeof inVector === 'undefined') {
6363
inVector = this;
6464
}
6565
return this.x;

0 commit comments

Comments
 (0)