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.

[UserPage] Fix tags on BrewItem

See original GitHub issue

As the tags data object was originally a string (''), when this was converted to an array (I assume using [].concat(tags), it resulted in the first item in the array being an empty string. As the current logic is only to check for the existence of an array (using tags.length > 0), every tags array will result in the logic evaluating to true. When the tags array is populated with data, the first item (tags[0]) will contain actual data.

Instead, we must not only check for the presence of an array, but also that the first item is NOT an empty string.

([].concat(brew.tags)[0]!='') was the logic used in the (now closed) #2330; it should only be a case of readding this logic to the ListPage.jsx logic.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
G-Ambattecommented, Sep 6, 2022

That’s what I’ve just been looking into… I’ve put in a tags array filter that eliminates empty strings immediately prior to updating an existing brew; this should also have the benefit of converting any tags string that has made it this far through the piece to an array,

1reaction
G-Ambattecommented, Sep 6, 2022

Alright, looks like the issue, such as it was, has already been resolved by the latest changes to NewPage.jsx getInitialState and componentDidMount. So future brews won’t be affected by the tags[0]='' issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FIX 4.2: Fields by Tag – FIX Dictionary - OnixS
FIX 4.2: Fields by Tag – FIX Dictionary – Onix Solutions.
Read more >
Text <58> field – FIX 4.2 – FIX Dictionary - OnixS
Used In. Description. Free format text string. (Note: this field does not have a specified maximum length). Used In. Reject <3> · Logout...
Read more >
SenderSubID <50> field – FIX 4.2 – FIX Dictionary - OnixS
FIX 4.2 : SenderSubID <50> field. Type: String. Used In. Description. Assigned value used to identify specific message originator (desk, trader, ...
Read more >
Side <54> field – FIX 4.2 – FIX Dictionary - OnixS
Side <54> field – FIX 4.2 – FIX Dictionary – Onix Solutions.
Read more >
ForexReq <121> field – FIX 4.2 – FIX Dictionary - OnixS
Used In. Description. Indicates request for forex accommodation trade to be executed along with security transaction. Valid values:.
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