Skip to content

ShowText node skips display of falsy first values (0, 0.0, false, empty string) #532

Description

@mozophe

The ShowText node does not display the first value when it is falsy (0, 0.0, false, "").

Root Cause

In web/js/showText.js, the populate function removes the first element if it is falsy:

const v = [...text];
if (!v[0]) {
v.shift();
}

This is intended to drop a spurious null/undefined leading element, but !v[0] on line 24 also matches legitimate falsy values like 0 or 0.0.

Suggested Fix:

In web/js/showText.js, line 23, replace:

if (!v[0]) {
with:
if (v[0] == null) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions