diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ef3176..44315d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,7 @@ build: stage: build script: - npm run build - - mv dist rick-dice-modifier + - mv dist risk-dice-modifier cache: <<: *global_cache artifacts: @@ -57,7 +57,7 @@ build: script: | npm run updateManifest -- --update=${RELEASE_TYPE} RELEASE_VERSION=$(jq -r '.version' < package.json) - git add package.json package-lock.json src/system.json + git add package.json package-lock.json src/module.json git --no-pager diff git commit -m "release version ${RELEASE_VERSION}" git tag -f latest diff --git a/src/module/risk.ts b/src/module/risk.ts index 116aa0b..dcc274a 100644 --- a/src/module/risk.ts +++ b/src/module/risk.ts @@ -26,11 +26,11 @@ function markResultActive(result: DiceTerm.Result): void { } function markFirstOneAndFirstTwoActive(results: DiceTerm.Result[]): void { - const firstOne = results.find((result) => result.result === 1) as DiceTerm.Result; - markResultActive(firstOne); + const firstOne = results.find((result) => result.result === 1); + if (firstOne) markResultActive(firstOne); - const firstTwo = results.find((result) => result.result === 2) as DiceTerm.Result; - markResultActive(firstTwo); + const firstTwo = results.find((result) => result.result === 2); + if (firstTwo) markResultActive(firstTwo); } function markFirstTwoOnesActive(results: DiceTerm.Result[]): void {