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.

unlinkAll doesn't work in case of the key including hyphen character

See original GitHub issue

Hi. I’v got trouble with using nohm v0.9.8 I’ve create a model that generate its id as uuid/v4. When I call remove method on instance of that model, an error occurred: Uncaught TypeError: Cannot read property ‘1’ of null at node_modules/nohm/lib/relations.js:233:29

After some reading the code, I found the reason why it make error. Because that cannot recognize hyphen character. So I’m suggesting search pattern of line num 233 be changed from
'/:([\w]*):([\w]*):[\w]+$/i' to
'/:([^\ :]*):([^\ :]*):[^\ :]+$/i'

This searches all character sequence excluding whitespace and delimiter colon. I hope as soon as possible this issue to be solved.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
nfyfamrcommented, May 27, 2018

Thanks martiz, you made my works more easier by this.

0reactions
maritzcommented, May 25, 2018

Fixed in v1.0.0 and docs are changed to mention modelName and relation name constraints.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jq doesn't work with keys which contains dash in it from a ...
I just want to get the key-key from the curled url with jq. While it works for arrays without dashes in declare -a...
Read more >
How do I delete a file whose name begins with "-" (hyphen ...
I don't think that will work. It traverses all the files in the current directory and all its subdirectories, and after all that...
Read more >
Hyphen key not working. - Microsoft Community
My power has gone out 4 times today and now the hyphen key is not working and it is only the one key....
Read more >
preg_match - Manual - PHP
validate input using preg_match, I tried using \p{script} but didn't work: ... The string must have 1 or more of any character like...
Read more >
hyphens - CSS: Cascading Style Sheets - MDN Web Docs
This character is not rendered visibly; instead, it marks a place where the browser should break the word if hyphenation is necessary. In...
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