guansss / userscripts

My userscript project.
MIT License
1 stars 0 forks source link

Getting --primary color can be empty, script crashes and doesn't continue #3

Closed hme54 closed 1 year ago

hme54 commented 1 year ago

https://github.com/guansss/userscripts/blob/6b7ed7f4da2314f4c85efe143aba02d2954ea78c/userscripts/iwara-enhancement/features/process-teasers.ts#L39

Consistently, color == "", so adjustAlpha throws exception and script doesn't continue. Maybe styles not loaded yet when the script runs. Adding if (!color) return right after this line seems to work.

guansss commented 1 year ago

Didn't notice that, thanks for reporting!

The fix is released.