ubaldop / vue-country-flag

Vue component for country flags

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

does not work in SSR

alex-milyutin opened this issue · comments

Tried in quasar SSR app component. Triggers error at click/show component CountryFlag.

runtime-dom.esm-bundler.js?8886:34 Uncaught (in promise) TypeError: Cannot read property 'parentNode' of null
at parentNode (runtime-dom.esm-bundler.js?8886:34)
at componentEffect (runtime-core.esm-bundler.js?9e79:5276)
at Object.reactiveEffect [as update] (reactivity.esm-bundler.js?0a2b:42)
at updateComponent (runtime-core.esm-bundler.js?9e79:5142)
at processComponent (runtime-core.esm-bundler.js?9e79:5075)
at patch (runtime-core.esm-bundler.js?9e79:4673)
at patchKeyedChildren (runtime-core.esm-bundler.js?9e79:5414)
at patchChildren (runtime-core.esm-bundler.js?9e79:5357)
at patchElement (runtime-core.esm-bundler.js?9e79:4948)
at processElement (runtime-core.esm-bundler.js?9e79:4757)

Hi @alex-milyutin, thanks for reporting this. Probably downgrading to v.2.0.4 should fix your issue. Could you please keep me updated if this downgrade solves it?

Indeed, I am investigating in restoring that 2.0.4 older behavior with a CSS property containing the flags.png sprite encoded as a Base64 uri.

In order to make the component working properly as a SFC with SSR also, I restored the original 2.0.4 behavior in the latest version, namely 2.3.1.

Please, have a look!