cschleiden / azure-boards-estimate

Estimate - Planning Poker for Azure Boards
https://marketplace.visualstudio.com/items?itemName=ms-devlabs.estimate
MIT License
59 stars 72 forks source link

Bug: Unexpected plugin crash #112

Open goldserg opened 4 years ago

goldserg commented 4 years ago

/_apis/public/gallery/publisher/ms-devlabs/extension/estimate/2.2.3/assetbyname/build/static/js/pages/session/components/workItemView.tsx

str 126

{(estimates || []).map(e => {
    const card = cardSet.cards.find(
        x =>
            x.identifier ===
                        e.cardIdentifier

e.cardIdentifier <- this maybe UNDEFINED

    )!;
    return this.renderCard(
        card,

card <- this too undefined, and next I see white screen

        false,
        false,
        (canPerformAdminActions &&
            this.doCommitCard.bind(
                this,
                card
            )) ||
            undefined
    );
})}
goldserg commented 4 years ago

image

goldserg commented 4 years ago
react-dom.production.min.js:5940 Uncaught TypeError: Cannot read property 'identifier' of undefined
    at t.n.renderCard (workItemView.tsx:175)
    at workItemView.tsx:132
    at Array.map (<anonymous>)
    at t.value (workItemView.tsx:126)
goldserg commented 4 years ago

Maybe something like this?

x.identifier ===
(e.cardIdentifier || '?')