adds support for babel-plugin-transform-runtime

This commit is contained in:
Wyatt Johnson
2017-07-31 15:51:34 +10:00
parent 2217c89aa7
commit 08edddf0df
18 changed files with 55 additions and 21 deletions
+2 -1
View File
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
+5
View File
@@ -267,6 +267,11 @@ Talk.render = function(el, opts) {
console.warn(
'This page does not include a canonical link tag. Talk has inferred this asset_url from the window object. Query params have been stripped, which may cause a single thread to be present across multiple pages.'
);
if (!window.location.origin) {
window.location.origin = `${window.location.protocol}//${window.location.hostname}${window.location.port ? `:${window.location.port}` : ''}`;
}
query.asset_url = window.location.origin + window.location.pathname;
}
}