We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a7b494b + 0ed902d commit 0a5fd25Copy full SHA for 0a5fd25
src/Web/Internal/FFI.js
@@ -1,16 +1,9 @@
1
"use strict";
2
3
exports._unsafeReadProtoTagged = function (nothing, just, name, value) {
4
- var obj = value;
5
- while (obj != null) {
6
- var proto = Object.getPrototypeOf(obj);
7
- var ctor = proto.constructor.name;
8
- if (ctor === name) {
9
- return just(value);
10
- } else if (ctor === "Object") {
11
- return nothing;
12
- }
13
- obj = proto;
+ var ty = window[name];
+ if (ty != null && value instanceof ty) {
+ return just(value);
14
}
15
return nothing;
16
};
0 commit comments