[FIX] observer: properly handle dates

This commit is contained in:
Géry Debongnie
2019-08-22 13:49:41 +02:00
parent fd0fb5be00
commit eaf912bed7
3 changed files with 22 additions and 2 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export class Observer {
}
observe(value: any, parent?: any): any {
if (value === null || typeof value !== "object") {
if (value === null || typeof value !== "object" || value instanceof Date) {
// fun fact: typeof null === 'object'
return value;
}