question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[JavaScript] TextRun with empty text generates an uncaught exception that prevents the card from rendering

See original GitHub issue

Platform

  • JavaScript

Author or host

Host Name : Microsoft Search

Version of SDK

adaptivecards-designer@0.7.1

Details

In the below example, the $when condition ends up generating a TextRun with an empty text, which causes the card to fail rendering:

{
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "RichTextBlock",
            "inlines": [
                {
                    "type": "TextRun",
                    "text": "{a}",
                    "$when": "{a==true}"
                }
            ],
            "$when": "{!!a==true}"
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "$data": {
        "a": ""
    }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
dclauxcommented, Nov 26, 2019

BTW, TextBlock (and TextRun) with an empty text simply do not render, by design - there is no need to use a $when clause for that.

0reactions
atishayvcommented, Nov 27, 2019

@dclaux Its all working… Thanks for the clarification

Read more comments on GitHub >

github_iconTop Results From Across the Web

Text renders blank in Chrome, reappears when selected
I'm using innerHTML to put HTML-formatted text in a <div> . At a consistent, seemingly random point in the text, the fonts stop...
Read more >
Bug List - Bugzilla - allizom.org
392601 · After continued use Firefox and Camino on Mac OS X both stop rendering pages correctly, and then entirely, Core, Layout, nobody,...
Read more >
chromium | buildbucket/cr-buildbucket.appspot.com ...
n", "0/layout-test-results/accessibility/inline-text-bounds-for-range-br-crash-log.txt": "crash log for renderer (pid <unknown>):\nSTDOUT: <empty>\nSTDERR: ...
Read more >
Forms Builder Version 3.6.1 - Help Guide
Best Practice to Prevent DbUpdateConcurrency Exceptions ... Builder Renderer has empty thumbprints for the Student STS and/or Contact STS.
Read more >
samba3x bug fix and enhancement update (Low)
With this update, mod_nss does not try to clear the SSL cache in the described scenario, thus preventing this bug. (BZ#691502) * Previously ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found