Skip to content

Commit

Permalink
hidden unnecessary error message
Browse files Browse the repository at this point in the history
  • Loading branch information
yourchocomate committed Feb 21, 2024
1 parent 6140e25 commit 958259f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,14 @@ Alpine.data("migrator", () => ({
}

if(!detectIfValidSQL(sql)) {
Alpine.store("errors").push("Invalid SQL");
emitter.emit("error:cleanup", { after: 2000 });
return;
}
console.log("Invalid SQL");
return;
};

try {
this.migrations = generateMigrations(sql);
} catch (error) {
Alpine.store("errors").push(error.message);
emitter.emit("error:cleanup", { after: 2000 });
console.error(error);
}
},

Expand Down

0 comments on commit 958259f

Please sign in to comment.