瀏覽代碼

fix baseUrl not assigned to source

iou90kant 5 年之前
父節點
當前提交
8f04163451
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3
    2
      autoHeightWebView/utils.js

+ 3
- 2
autoHeightWebView/utils.js 查看文件

@@ -119,8 +119,9 @@ export const isSizeChanged = ({ height, previousHeight, width, previousWidth })
119 119
 export const reduceData = props => {
120 120
   const { source } = props;
121 121
   const script = getScript(props);
122
-  if (source.html) {
123
-    return { currentSource: { html: getInjectedSource({ html: source.html, script }) } };
122
+  const { html, baseUrl } = source;
123
+  if (html) {
124
+    return { currentSource: { baseUrl, html: getInjectedSource({ html, script }) } };
124 125
   } else {
125 126
     return {
126 127
       currentSource: source,