Commit ea3455a1 authored by chenqikuai's avatar chenqikuai

v.0.4.5

parent caa18687
import Dexie from "dexie";
export const APPVERSION = "0.4.4";
export const APPVERSION = "0.4.5";
export const set_version = () => {
localStorage.setItem("version", APPVERSION);
......@@ -20,13 +20,13 @@ export const checkVersionAndDoSomething = async () => {
set_version();
console.log("version:", currentVersion);
if (!oldVersion || compareVersion(oldVersion, "0.4.2") === -1) {
if (!oldVersion || compareVersion(oldVersion, "0.4.4") !== 1) {
return Dexie.delete("MyAppDatabase")
.then((r) => {
console.log(r, "success");
.then(() => {
console.log("delete database success");
})
.catch((f) => {
console.log(f, "faill");
.catch(() => {
console.log("delete database failed");
});
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment