Browse Source

fix 0f83a816: set last modified date when not specified

tophf 2 years ago
parent
commit
f75e201564
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/background/utils/db.js

+ 1 - 1
src/background/utils/db.js

@@ -596,7 +596,7 @@ export async function parseScript(src) {
     }
     delete script[INFERRED];
   }
-  props.lastModified = props.lastUpdated = src.lastModified;
+  props.lastModified = props.lastUpdated = src.lastModified || Date.now();
   props.uuid = props.uuid || getUUID();
   // Overwriting inner data by `src`, deleting keys for which `src` specifies `null`
   for (const key of ['config', 'custom', 'props']) {