fix(ui): don't update last/num visited if object is nonexistent
This commit is contained in:
parent
de688581ee
commit
be869b1db0
1 changed files with 1 additions and 1 deletions
|
@ -203,7 +203,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$: entity.subscribe(async (object) => {
|
$: entity.subscribe(async (object) => {
|
||||||
if (object) {
|
if (object && object.listing.entries.length) {
|
||||||
await putEntityAttribute(object.address, "LAST_VISITED", {
|
await putEntityAttribute(object.address, "LAST_VISITED", {
|
||||||
t: "Number",
|
t: "Number",
|
||||||
c: new Date().getTime() / 1000,
|
c: new Date().getTime() / 1000,
|
||||||
|
|
Loading…
Reference in a new issue