@thoughtbot/superglue 2.0.0-alpha.5 → 2.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/superglue.cjs
CHANGED
|
@@ -7148,7 +7148,21 @@ var rootReducer = {
|
|
|
7148
7148
|
};
|
|
7149
7149
|
|
|
7150
7150
|
// lib/index.tsx
|
|
7151
|
-
|
|
7151
|
+
function getConfig(name) {
|
|
7152
|
+
if (typeof document !== "undefined") {
|
|
7153
|
+
const element = document.head.querySelector(
|
|
7154
|
+
`meta[name='action-cable-${name}']`
|
|
7155
|
+
);
|
|
7156
|
+
if (element) {
|
|
7157
|
+
return element.getAttribute("content") || "/cable";
|
|
7158
|
+
} else {
|
|
7159
|
+
return "/cable";
|
|
7160
|
+
}
|
|
7161
|
+
} else {
|
|
7162
|
+
return "/cable";
|
|
7163
|
+
}
|
|
7164
|
+
}
|
|
7165
|
+
var cable = (0, import_actioncable.createConsumer)(getConfig("url"));
|
|
7152
7166
|
var hasWindow2 = typeof window !== "undefined";
|
|
7153
7167
|
var createHistory = () => {
|
|
7154
7168
|
if (hasWindow2) {
|