Last active
March 14, 2019 15:35
-
-
Save bborgesr/124c7d093aa02e4afee759353fbb92b3 to your computer and use it in GitHub Desktop.
[Make a CMS card's id unique] Reusing existing code, and keeping in mind that it's preferrable to destructure the object rather than mutate the id in place. #cms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
const card = buildCard( | |
card, | |
data, | |
filtersAndFormatters, | |
Object.assign({}, settingsAndOptions, { cardIndex }) | |
); | |
return {...card, id: `${card.id}:${cardIndex}`}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment