Skip to content

Create window.customCards if no card has yet - #244

Open
LeeS773-prog wants to merge 1 commit into
nathan-gs:mainfrom
StrausbergAutomationWorks:fix/card-picker-list
Open

LeeS773-prog wants to merge 1 commit into
nathan-gs:mainfrom
StrausbergAutomationWorks:fix/card-picker-list

Conversation

@LeeS773-prog

Copy link
Copy Markdown

index.js pushes to window.customCards without creating it. If no card that loaded earlier has created the list, the push throws after the elements are defined: the card works, but it is missing from the card picker. This uses the usual window.customCards = window.customCards || [] first.

Tests: src/index.picker.test.js (2; the first fails without the change). Full suite 195/195; eslint reports the same errors as main and none in the files touched.

index.js pushes to window.customCards without creating it. If no card that
loaded earlier has created the list, the push throws after the elements are
defined: the card works, but it is missing from the card picker. Use the
usual `window.customCards = window.customCards || []` first.

Test: src/index.picker.test.js (2).
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

Successfully merging this pull request may close these issues.

1 participant