Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI updates: Bug fix for MS Edge

Rich Turnerf9c8b95eebab
diff --git a/ui/component/core/src/index.ts b/ui/component/core/src/index.ts
index adad117a5..f057ab14c 100644
--- a/ui/component/core/src/index.ts
+++ b/ui/component/core/src/index.ts
@@ -259,7 +259,7 @@ export class Manager implements EventProviderFactory {
if (!normalisedConfig.managerUrl || normalisedConfig.managerUrl === "") {
// Assume manager is running on same host as this code
- normalisedConfig.managerUrl = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port;
+ normalisedConfig.managerUrl = window.location.protocol + "//" + window.location.hostname + (window.location.port ? + ":" + window.location.port : "");
} else {
// Normalise by stripping any trailing slashes
normalisedConfig.managerUrl = normalisedConfig.managerUrl.replace(/\/+$/, "");