Skip to content

Commit 5ca4060

Browse files
authored
fix: remove nested import
Signed-off-by: Athan <[email protected]>
1 parent 9a7c78e commit 5ca4060

File tree

1 file changed

+6
-1
lines changed
  • lib/node_modules/@stdlib/utils/nonenumerable-properties-in/lib

1 file changed

+6
-1
lines changed

lib/node_modules/@stdlib/utils/nonenumerable-properties-in/lib/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var getOwnPropertyNames = require( '@stdlib/utils/property-names' );
2525
var getPrototypeOf = require( '@stdlib/utils/get-prototype-of' );
2626
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2727
var isNonEnumerable = require( '@stdlib/assert/is-nonenumerable-property' );
28+
var Object = require( '@stdlib/object/ctor' );
2829

2930

3031
// MAIN //
@@ -40,13 +41,17 @@ var isNonEnumerable = require( '@stdlib/assert/is-nonenumerable-property' );
4041
* // returns [...]
4142
*/
4243
function nonEnumerablePropertiesIn( value ) {
43-
var Object = require( '@stdlib/object/ctor' );
4444
var cache;
4545
var out;
4646
var obj;
4747
var tmp;
4848
var k;
4949
var i;
50+
51+
if ( value === null || value === void 0 ) {
52+
return [];
53+
}
54+
// Cast the value to an object:
5055
obj = Object( value );
5156

5257
// Walk the prototype chain collecting non-enumerable properties...

0 commit comments

Comments
 (0)