Commit 98e8340885efef33b60f93a13f4e20ac8d34406d
Committed by
GitHub
Merge pull request #84 from OutOfBedlam/PR/compat_ie
exception check (for IE)
Showing
4 changed files
with
11 additions
and
2 deletions
... | ... | @@ -546,7 +546,7 @@ function DatasourceSubscription(datasourceSubscription, telemetryWebsocketServic |
546 | 546 | var keyData = sourceData[keyName]; |
547 | 547 | var key = keyName + '_' + type; |
548 | 548 | var dataKeyList = dataKeys[key]; |
549 | - for (var keyIndex = 0; keyIndex < dataKeyList.length; keyIndex++) { | |
549 | + for (var keyIndex = 0; dataKeyList && keyIndex < dataKeyList.length; keyIndex++) { | |
550 | 550 | var datasourceKey = key + "_" + keyIndex; |
551 | 551 | if (datasourceData[datasourceKey].data) { |
552 | 552 | var dataKey = dataKeyList[keyIndex]; |
... | ... | @@ -595,6 +595,8 @@ function DatasourceSubscription(datasourceSubscription, telemetryWebsocketServic |
595 | 595 | datasourceData[datasourceKey].data = data; |
596 | 596 | for (var i2 in listeners) { |
597 | 597 | var listener = listeners[i2]; |
598 | + if (angular.isFunction(listener)) | |
599 | + continue; | |
598 | 600 | listener.dataUpdated(datasourceData[datasourceKey], |
599 | 601 | listener.datasourceIndex, |
600 | 602 | dataKey.index, apply); |
... | ... | @@ -605,4 +607,3 @@ function DatasourceSubscription(datasourceSubscription, telemetryWebsocketServic |
605 | 607 | } |
606 | 608 | } |
607 | 609 | } |
608 | - | ... | ... |
... | ... | @@ -158,6 +158,8 @@ function UserService($http, $q, $rootScope, adminService, dashboardService, toas |
158 | 158 | |
159 | 159 | function resolveRefreshTokenQueue(data) { |
160 | 160 | for (var q in refreshTokenQueue) { |
161 | + if (isNaN(q)) | |
162 | + continue; | |
161 | 163 | refreshTokenQueue[q].resolve(data); |
162 | 164 | } |
163 | 165 | refreshTokenQueue = []; |
... | ... | @@ -165,6 +167,8 @@ function UserService($http, $q, $rootScope, adminService, dashboardService, toas |
165 | 167 | |
166 | 168 | function rejectRefreshTokenQueue(message) { |
167 | 169 | for (var q in refreshTokenQueue) { |
170 | + if (isNaN(q)) | |
171 | + continue; | |
168 | 172 | refreshTokenQueue[q].reject(message); |
169 | 173 | } |
170 | 174 | refreshTokenQueue = []; | ... | ... |
... | ... | @@ -483,6 +483,8 @@ function WidgetService($rootScope, $http, $q, $filter, $ocLazyLoad, $window, typ |
483 | 483 | var fetchQueue = widgetsInfoFetchQueue[key]; |
484 | 484 | if (fetchQueue) { |
485 | 485 | for (var q in fetchQueue) { |
486 | + if (isNaN(q)) | |
487 | + continue; | |
486 | 488 | fetchQueue[q].resolve(widgetInfo); |
487 | 489 | } |
488 | 490 | delete widgetsInfoFetchQueue[key]; | ... | ... |
... | ... | @@ -807,6 +807,8 @@ export default function WidgetController($scope, $timeout, $window, $element, $q |
807 | 807 | var index = 0; |
808 | 808 | for (var i in widgetContext.datasources) { |
809 | 809 | var datasource = widgetContext.datasources[i]; |
810 | + if (angular.isFunction(datasource)) | |
811 | + continue; | |
810 | 812 | var deviceId = null; |
811 | 813 | if (datasource.type === types.datasourceType.device && datasource.deviceAliasId) { |
812 | 814 | if (aliasesInfo.deviceAliases[datasource.deviceAliasId]) { | ... | ... |