👽 fix typescript typing error (#1120)

This commit is contained in:
Kuitos 2020-12-03 18:43:20 +08:00 committed by GitHub
parent 1e1bacd37b
commit dc8792c1ad

View File

@ -182,7 +182,10 @@ function getOverwrittenAppendChildOrInsertBefore(opts: {
(element as HTMLLinkElement).rel === 'stylesheet' &&
(element as HTMLLinkElement).href;
if (linkElementUsingStylesheet) {
const { fetch } = frameworkConfiguration;
const fetch =
typeof frameworkConfiguration.fetch === 'function'
? frameworkConfiguration.fetch
: frameworkConfiguration.fetch?.fn;
stylesheetElement = convertLinkAsStyle(
element,
(styleElement) => css.process(mountDOM, styleElement, appName),