File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
lib/node_modules/@stdlib/utils/nonenumerable-properties-in/lib Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ var getOwnPropertyNames = require( '@stdlib/utils/property-names' );
25
25
var getPrototypeOf = require ( '@stdlib/utils/get-prototype-of' ) ;
26
26
var hasOwnProp = require ( '@stdlib/assert/has-own-property' ) ;
27
27
var isNonEnumerable = require ( '@stdlib/assert/is-nonenumerable-property' ) ;
28
+ var Object = require ( '@stdlib/object/ctor' ) ;
28
29
29
30
30
31
// MAIN //
@@ -40,13 +41,17 @@ var isNonEnumerable = require( '@stdlib/assert/is-nonenumerable-property' );
40
41
* // returns [...]
41
42
*/
42
43
function nonEnumerablePropertiesIn ( value ) {
43
- var Object = require ( '@stdlib/object/ctor' ) ;
44
44
var cache ;
45
45
var out ;
46
46
var obj ;
47
47
var tmp ;
48
48
var k ;
49
49
var i ;
50
+
51
+ if ( value === null || value === void 0 ) {
52
+ return [ ] ;
53
+ }
54
+ // Cast the value to an object:
50
55
obj = Object ( value ) ;
51
56
52
57
// Walk the prototype chain collecting non-enumerable properties...
You can’t perform that action at this time.
0 commit comments