mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
adds support for babel-plugin-transform-runtime
This commit is contained in:
+2
-1
@@ -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}]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user