feat: make watch$ strictNullCheck compatible (#34)

* feat: make `watch$` strictNullCheck compatible

* chore: send initial value to subscribers

* let values emit when undefined

* fix: properly check if data can be processed

Co-authored-by: Lucy Cifferello <12953208+elvece@users.noreply.github.com>
This commit is contained in:
Alex Inkin
2022-06-19 22:19:00 +03:00
committed by GitHub
parent 8e7c893d48
commit e138b88e75
2 changed files with 34 additions and 28 deletions

View File

@@ -75,7 +75,7 @@ function recursiveApply<T extends Record<string, T>> (data: T, path: readonly st
}
function isObject (val: any): val is Record<string, unknown> {
return typeof val === 'object' && !Array.isArray(val) && val !== null
return typeof val === 'object' && val !== null
}
function jsonPathToKeyArray (path: string): string[] {