File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
3
3
exports . _unsafeReadProtoTagged = function ( nothing , just , name , value ) {
4
- if ( typeof window !== ' undefined' ) {
4
+ if ( typeof window !== " undefined" ) {
5
5
var ty = window [ name ] ;
6
6
if ( ty != null && value instanceof ty ) {
7
7
return just ( value ) ;
8
8
}
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 ;
20
19
}
20
+ obj = proto ;
21
21
}
22
22
return nothing ;
23
23
} ;
You can’t perform that action at this time.
0 commit comments