Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 8640947

Browse files
komachifknop
authored andcommitted
Don't consider null as an object (#55)
1 parent 823ebee commit 8640947

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function isString (value: any): value is string {
4444

4545
export function isObject (value: any): boolean {
4646

47-
return typeof value === 'object';
47+
return value !== null && typeof value === 'object';
4848
}
4949

5050
export function isArray (value: any): boolean {
@@ -338,4 +338,4 @@ export function takeUntil (input: any[], predicate: CollectionPredicate) {
338338

339339
export function takeWhile (input: any[], predicate: CollectionPredicate) {
340340
return takeUntil(input, (item: any, index: number, collection: any[]) => !predicate(item, index, collection));
341-
}
341+
}

0 commit comments

Comments
 (0)