Skip to content

Commit 17aba76

Browse files
committed
add url.host.includes('roamjs') to handleUrlFetch
1 parent f9cb77d commit 17aba76

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/node_modules/roamjs-components/util/handleUrlFetch.js b/node_modules/roamjs-components/util/handleUrlFetch.js
2+
index 3d3c377..c609e7e 100644
3+
--- a/node_modules/roamjs-components/util/handleUrlFetch.js
4+
+++ b/node_modules/roamjs-components/util/handleUrlFetch.js
5+
@@ -6,7 +6,7 @@ const handleFetch_1 = tslib_1.__importDefault(require("./handleFetch"));
6+
const handleUrlFetch = (method) => (args, _data) => {
7+
const _a = typeof args === "string" ? { path: args, data: _data } : args, { data = {} } = _a, fetchArgs = tslib_1.__rest(_a, ["data"]);
8+
return (0, handleFetch_1.default)((url, init) => {
9+
- if ((0, env_1.getNodeEnv)() === "development") {
10+
+ if ((0, env_1.getNodeEnv)() === "development" && url.host.includes('roamjs')) {
11+
url.searchParams.set("dev", "true");
12+
}
13+
Object.entries(data).forEach(([k, v]) => url.searchParams.set(k, v));

0 commit comments

Comments
 (0)