Skip to content

Commit 27e61c1

Browse files
committed
Add Utils.isLocal
1 parent 803083e commit 27e61c1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

dev/src/net/Server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class ServerPromise {
195195
}
196196
}
197197

198-
Server.isLocal = (window.location.hostname === "localhost");
198+
Server.isLocal = Utils.isLocal;
199199
Server.useBeta = Server.isLocal || (window.location.hostname === "beta.regexr.com");
200200
Server.host = "https://" + (Server.useBeta ? "beta." : "") + "regexr.com"
201201
Server.url = Server.host + "/server/api.php";

dev/src/utils/Utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ Utils.getPatternURL = function(pattern) {
154154
return url+id;
155155
}
156156

157+
Utils.isLocal = (window.location.hostname === "localhost");
158+
157159
Utils.getPatternURLStr = function(pattern) {
158160
if (!pattern || !pattern.id) { return null; }
159161
let url = window.location.host+"/", id=pattern.id;

0 commit comments

Comments
 (0)