Skip to content

Commit 4ca2876

Browse files
committed
refactor: add Phoenix.isDesktopApp global
1 parent c690eaa commit 4ca2876

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/extensions/default/JSHint/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ define(function (require, exports, module) {
217217

218218
function _projectFileChanged(_evt, entry, added, removed) {
219219
let configFilePath = FileSystem.getFileForPath(ProjectManager.getProjectRoot().fullPath + CONFIG_FILE_NAME);
220-
if(entry.fullPath === configFilePath.fullPath
220+
if(entry && entry.fullPath === configFilePath.fullPath
221221
|| _isFileInArray(configFilePath, added)){
222222
_reloadOptions();
223223
} else if(_isFileInArray(configFilePath, removed)){

src/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@
346346
'https://create.phcode.dev': true
347347
}
348348
};
349+
window.Phoenix.isDesktopApp = window.Phoenix.browser.isTauri;
349350
window.Phoenix.TRUSTED_ORIGINS[location.origin] = true;
350351
Phoenix.isSupportedBrowser = Phoenix.browser.isTauri ||
351352
(Phoenix.browser.isDeskTop && ("serviceWorker" in navigator));

test/SpecRunner.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@
286286
'https://create.phcode.dev': true
287287
}
288288
};
289+
window.Phoenix.isDesktopApp = window.Phoenix.browser.isTauri;
289290
window.Phoenix.TRUSTED_ORIGINS[location.origin] = true;
290291
Phoenix.isSupportedBrowser = Phoenix.browser.isTauri ||
291292
(Phoenix.browser.isDeskTop && ("serviceWorker" in navigator));

0 commit comments

Comments
 (0)