Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
fix(service): fixed IE8 "Expected identifier" error
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalii Goma authored and knalli committed Jun 22, 2017
1 parent c2ff1b3 commit a30e37a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/service/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1152,8 +1152,7 @@ function $translate($STORAGE_KEY, $windowProvider, $translateSanitizationProvide
};
promiseResolved.displayName = 'promiseResolved';

promiseToWaitFor['finally'](promiseResolved)
.catch(angular.noop); // we don't care about errors here, already handled
promiseToWaitFor['finally'](promiseResolved)['catch'](angular.noop); // we don't care about errors here, already handled
}
return deferred.promise;
};
Expand Down Expand Up @@ -1908,7 +1907,7 @@ function $translate($STORAGE_KEY, $windowProvider, $translateSanitizationProvide
});
langPromises[key]['finally'](function () {
clearNextLangAndPromise(key);
}).catch(angular.noop); // we don't care about errors (clearing)
})['catch'](angular.noop); // we don't care about errors (clearing)
} else if (langPromises[key]) {
// we are already loading this asynchronously
// resolve our new deferred when the old langPromise is resolved
Expand Down Expand Up @@ -2078,7 +2077,7 @@ function $translate($STORAGE_KEY, $windowProvider, $translateSanitizationProvide
},
//handle rejection to appease the $q validation
angular.noop
).finally(
)['finally'](
function () {
$rootScope.$emit('$translateRefreshEnd', {language : langKey});
}
Expand Down

0 comments on commit a30e37a

Please sign in to comment.