Fix issues caused by invalid xsd:dateTime values
Invalid dateTime strings were saved in the DB as NaN causing uncaught exception in CSV download.
This commit is contained in:
1 parent
2b37f11e2e
commit
4b533d0aad
2 files changed
+2
-2
No files matched your search
@@ -148,7 +148,7 @@ export async function fetchDevice(
|
||||
|
||||
if (obj["_value"] != null) {
|
||||
attrs.value = [obj["_timestamp"] || 1, [obj["_value"], obj["_type"]]];
|
||||
if (obj["_type"] === "xsd:dateTime")
|
||||
if (obj["_type"] === "xsd:dateTime" && obj["_value"] instanceof Date)
|
||||
attrs.value[1][0] = +attrs.value[1][0];
|
||||
|
||||
obj["_object"] = false;
|
||||
|
||||
Reference in new issue
Block a user