8000 When creating a rule that checks tags "Cannot read properties of null" · Issue #102 · gfxholo/iconic · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

When creating a rule that checks tags "Cannot read properties of null" #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SamEdwardes opened this issue Mar 12, 2025 · 2 comments
Open
Labels
bug Something isn't working
Milestone

Comments

@SamEdwardes
Copy link

I am trying to create a rule that checks tags. When I do this, the matches button spins:

Image

I get this error in JS console:

plugin:iconic:7 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'toLowerCase')
    at eval (plugin:iconic:7:315657)
    at Array.map (<anonymous>)
    at p.judgeFile (plugin:iconic:7:315648)
    at p.judgeFiles (plugin:iconic:7:314135)
    at R.updateMatchesButton (plugin:iconic:7:207766)
    at fe.eval [as onChange] (plugin:iconic:7:206818)
    at fe.refreshValue (plugin:iconic:7:215783)
    at eval (plugin:iconic:7:209527)
    at HTMLSelectElement.<anonymous> (app.js:1:1352877)
@gfxholo gfxholo added the bug Something isn't working label Mar 12, 2025
@gfxholo
Copy link
Owner
gfxholo commented Mar 12, 2025

Thanks so much for sharing your error log! That narrows it down to this line of code 💖

const sourceLowers = Array.isArray(source) ? source.map(item => item.toLowerCase()) : [];

Seems like it's possible for a tags property to return a value of [ null ] instead of null when we grab it from the metadata cache, back at this line.

I'll add a fix for this in 1.1.2, and hopefully that solves your problem :]

@gfxholo gfxholo added this to the 1.1.2 milestone Mar 12, 2025
@SamEdwardes
Copy link
Author

Awesome, thank you for looking at the issue and figuring out a fix. I just started to use Iconic and find it really helpful. Appreciate the work.

4BD4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0