seethroughdev / obsidian-recipe-grabber

MIT License
59 stars 8 forks source link

Getting lots of errors in load #32

Closed seethroughdev closed 5 months ago

seethroughdev commented 5 months ago

Getting undefined error with keys. Will fix today.

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at traverse (plugin:recipe-grabber:23069:14)
    at eval (plugin:recipe-grabber:23081:11)
    at Array.forEach (<anonymous>)
    at traverse (plugin:recipe-grabber:23069:24)
    at RecipeGrabber.unescapeHtml (plugin:recipe-grabber:23085:5)
    at normalizeSchema (plugin:recipe-grabber:22957:21)
    at eval (plugin:recipe-grabber:22968:13)
    at Array.forEach (<anonymous>)
    at handleSchemas (plugin:recipe-grabber:22962:15)
seethroughdev commented 5 months ago

It appears to be coming from the unescape function, which is behind a settings flag. Will debug later.

Flxp49 commented 5 months ago

How about we scrap this function and use DOMParser to parse the HTML by default? What do you guys think? @seethroughdev @Ovyerus

Mentioned here

seethroughdev commented 5 months ago

Good point. i'll add it in tomorrow!

seethroughdev commented 5 months ago

Thanks @Flxp49 , I fixed the code here: https://github.com/seethroughdev/obsidian-recipe-grabber/pull/33#issuecomment-2148279597

seethroughdev commented 5 months ago

Fixed in https://github.com/seethroughdev/obsidian-recipe-grabber/releases/tag/0.21.0!