Skip to content

Added check to ensure Adaptive Card's content is an Object#2590

Merged
corinagum merged 2 commits intomicrosoft:masterfrom
tdurnford:2512
Nov 12, 2019
Merged

Added check to ensure Adaptive Card's content is an Object#2590
corinagum merged 2 commits intomicrosoft:masterfrom
tdurnford:2512

Conversation

@tdurnford
Copy link
Copy Markdown
Contributor

@tdurnford tdurnford commented Nov 12, 2019

Fixes #2512

Changelog Entry

Fixes #2512. Adds check to ensure Adaptive Card's content is an Object, by @tdurnford in PR #25XX

Description

In the AdaptiveCardAttachement, we pass the card content to Adaptive Card's parse function to create the card. If the content is not an Object, Adaptive Cards is supposed to push an error onto the errors array. This works fine in Chrome; however, in IE 11, the browser throws an 'argument is not object' error since the Object.keys method is expecting an object and we are passing something that is not an object. As a temporary workaround, I added a check in the AdaptiveCardAttachement component to make sure the Adaptive Card content is an object before parsing the card.


  • Testing Added

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.01%) to 64.049% when pulling 419289e on tdurnford:2512 into ca2107c on microsoft:master.

@corinagum corinagum merged commit 3689091 into microsoft:master Nov 12, 2019
@compulim compulim mentioned this pull request Dec 10, 2019
73 tasks
@corinagum corinagum mentioned this pull request Dec 13, 2019
73 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internet Explorer 11: invalidCard command (MockBot) produces error

3 participants