Skip to content

Commit 9dd1280

Browse files
committed
Fix _unsafeReadProtoTagged in Node JS (ci fix)
1 parent 23aa149 commit 9dd1280

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Web/Internal/FFI.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
"use strict";
22

33
exports._unsafeReadProtoTagged = function (nothing, just, name, value) {
4-
if (typeof window !== 'undefined') {
4+
if (typeof window !== "undefined") {
55
var ty = window[name];
66
if (ty != null && value instanceof ty) {
77
return just(value);
88
}
9-
} else {
10-
var obj = value;
11-
while (obj != null) {
12-
var proto = Object.getPrototypeOf(obj);
13-
var constructorName = proto.constructor.name;
14-
if (constructorName === name) {
15-
return just(value);
16-
} else if (constructorName === "Object") {
17-
return nothing;
18-
}
19-
obj = proto;
9+
return nothing;
10+
}
11+
var obj = value;
12+
while (obj != null) {
13+
var proto = Object.getPrototypeOf(obj);
14+
var constructorName = proto.constructor.name;
15+
if (constructorName === name) {
16+
return just(value);
17+
} else if (constructorName === "Object") {
18+
return nothing;
2019
}
20+
obj = proto;
2121
}
2222
return nothing;
2323
};

0 commit comments

Comments
 (0)