Skip to content

Commit

Permalink
removed logs, prevent save on bad data
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Jan 22, 2022
1 parent 8cfcfc5 commit eae00de
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/settings/EditMonster.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import {
ButtonComponent,
ExtraButtonComponent,
Notice,
parseYaml,
stringifyYaml
} from "obsidian";
Expand Down Expand Up @@ -34,12 +35,12 @@
} else {
monster = parseYaml(textArea.value);
}
console.log(
"🚀 ~ file: EditMonster.svelte ~ line 36 ~ monster",
monster
);
} catch (e) {
console.error(e);
new Notice(
`There was an error saving the creaturen\n\n${e.message}`
);
return;
}
}
dispatch("save", monster);
Expand Down Expand Up @@ -67,10 +68,6 @@
} else {
monster = parseYaml(textArea.value);
}
console.log(
"🚀 ~ file: EditMonster.svelte ~ line 36 ~ monster",
monster
);
} catch (e) {
console.error(e);
}
Expand Down

0 comments on commit eae00de

Please sign in to comment.