Skip to content

Commit

Permalink
fix: Reverts unintentional breaking Dice Roller change
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Oct 4, 2024
1 parent d441c1f commit 5769efe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@codemirror/lang-javascript": "^6.2.1",
"@codemirror/language": "^6.9.1",
"@codemirror/search": "^6.5.3",
"@javalent/dice-roller": "^11.2.1",
"@javalent/dice-roller": "^11.3.1",
"@javalent/fantasy-statblocks": "^4.4.0",
"@tsconfig/svelte": "^5.0.2",
"@types/node": "^20.6.3",
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export default class InitiativeTracker extends Plugin {
getRoller(str: string) {
if (!this.canUseDiceRoller) return;
const roller = window.DiceRoller.getRoller(str, "statblock");
if (roller.isNone()) return null;
return roller.unwrap() as StackRoller;
if (roller === null) return null;
return roller as StackRoller;
}
get canUseDiceRoller() {
if (window.DiceRoller != null) {
Expand Down

0 comments on commit 5769efe

Please sign in to comment.