use != null

This commit is contained in:
Niels Lyngsø
2023-01-24 16:48:36 +01:00
parent 5f40d609d9
commit 408bd7bb5d

View File

@@ -3,7 +3,7 @@ import { BehaviorSubject } from "rxjs";
// TODO: Should this handle array as well?
function deepFreeze<T>(inObj: T): T {
if(inObj && typeof inObj === 'object') {
if(inObj != null && typeof inObj === 'object') {
Object.freeze(inObj);
Object.getOwnPropertyNames(inObj)?.forEach(function (prop) {