Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: CS Special modifiers throwing Undefined error #279

Open
kiwitrav opened this issue Feb 13, 2024 · 0 comments
Open

BUG: CS Special modifiers throwing Undefined error #279

kiwitrav opened this issue Feb 13, 2024 · 0 comments

Comments

@kiwitrav
Copy link
Contributor

To Replicate:
Switch to the Crimson Scales expansion (even if already selected)
Add ANY modifier
Errors occur in JS console

Issue:
checkIfSanctuary in modifiers.js causing new game to not work & anomalous behaviour when playing modifiers (same modifier keeps playing over & over)

Temp work-around:
Either revert PR #277 or
Add element.name !== undefined && to the filter on line 146, ie:
const sanctuaryCards = this.modifiersSpecial.find(element => element.name !== undefined && element.name.startsWith(sanctuaryNamePrefix))

Working on actual fix

Debugging:

loaded crimson scales
vue.js:634 [Vue warn]: Error in v-on handler: "TypeError: Cannot read properties of undefined (reading 'startsWith')"

(found in <Root>)
warn @ vue.js:634
logError @ vue.js:1893
globalHandleError @ vue.js:1888
handleError @ vue.js:1848
invokeWithErrorHandling @ vue.js:1871
invoker @ vue.js:2188
original._wrapper @ vue.js:7547
vue.js:1897 TypeError: Cannot read properties of undefined (reading 'startsWith')
    at modifiers.js:146:88
    at Array.find (<anonymous>)
    at Vue.checkIfSanctuary (modifiers.js:146:58)
    at Vue.checkIfBlessing (modifiers.js:154:117)
    at Vue.removeModifier (modifiers.js:120:22)
    at click (eval at createFunction (vue.js:1:1), <anonymous>:3:24828)
    at invokeWithErrorHandling (vue.js:1863:28)
    at HTMLDivElement.invoker (vue.js:2188:16)
    at original._wrapper (vue.js:7547:27)
@kiwitrav kiwitrav mentioned this issue Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant