Unverified Commit 9a7357a5 authored by zrh122's avatar zrh122 Committed by GitHub

fix: fix getting shadow root when component is functional (#1560)

parent 032d56be
...@@ -62,7 +62,12 @@ export default function normalizeComponent ( ...@@ -62,7 +62,12 @@ export default function normalizeComponent (
options._ssrRegister = hook options._ssrRegister = hook
} else if (injectStyles) { } else if (injectStyles) {
hook = shadowMode hook = shadowMode
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } ? function () {
injectStyles.call(
this,
(options.functional ? this.parent : this).$root.$options.shadowRoot
)
}
: injectStyles : injectStyles
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment