Skip to content

Commit 8287713

Browse files
author
alonb
committed
fix(ie8 support): visor was not IE8 compatible due to using promise.finally directly. Issue #1
1 parent 3011aea commit 8287713

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "visor",
33
"description": "Angular authentication and authorization library",
4-
"version": "0.0.2",
4+
"version": "0.0.3",
55
"homepage": "https://github.com/illniyar/visor",
66
"main": "./release/visor.js",
77
"dependencies": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "visor",
33
"private": true,
44
"author":"Illniyar",
5-
"version": "0.0.2",
5+
"version": "0.0.3",
66
"description": "Angular authentication and authorization library",
77
"repository": "https://github.com/illniyar/visor",
88
"homepage":"https://github.com/illniyar/visor",

release/visor.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**visor
22
* Angular authentication and authorization library
3-
* @version v0.0.2
3+
* @version v0.0.3
44
* @link https://github.com/illniyar/visor
55
* @license MIT License, http://www.opensource.org/licenses/MIT
66
*/
@@ -44,7 +44,7 @@ if (typeof module !== "undefined" && typeof exports !== "undefined" && module.ex
4444
};
4545
function addPromise(promise){
4646
unfinishedPromises++;
47-
promise.finally(checkPromises);
47+
promise["finally"](checkPromises);
4848
}
4949
var unlisten = $rootScope.$on("$locationChangeStart",function(e,toUrl,fromUrl){
5050
changeStarted = true;
@@ -422,7 +422,7 @@ if (typeof module !== "undefined" && typeof exports !== "undefined" && module.ex
422422
_authenticationPromise = deferred.promise;
423423
$injector.invoke(config.authenticate)
424424
.then(onAuthenticationSuccess,onAuthenticationFailed)
425-
.finally(function(){
425+
["finally"](function(){
426426
deferred.resolve(Visor.authData)
427427
});
428428
return deferred.promise;
@@ -572,7 +572,7 @@ if (typeof module !== "undefined" && typeof exports !== "undefined" && module.ex
572572
$q.all(config.doBeforeFirstCheck.map(function(cb){
573573
return $injector.invoke(cb)
574574
}))
575-
.finally(function(){
575+
["finally"](function(){
576576
finishedBeforeCheck = true;
577577
if (handlePermission(next,permissions)) {
578578
waitForMe.resolve(true);

release/visor.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/delayLocationChange.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
};
3434
function addPromise(promise){
3535
unfinishedPromises++;
36-
promise.finally(checkPromises);
36+
promise["finally"](checkPromises);
3737
}
3838
var unlisten = $rootScope.$on("$locationChangeStart",function(e,toUrl,fromUrl){
3939
changeStarted = true;

src/visor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@
357357
_authenticationPromise = deferred.promise;
358358
$injector.invoke(config.authenticate)
359359
.then(onAuthenticationSuccess,onAuthenticationFailed)
360-
.finally(function(){
360+
["finally"](function(){
361361
deferred.resolve(Visor.authData)
362362
});
363363
return deferred.promise;

src/visor.permissions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
$q.all(config.doBeforeFirstCheck.map(function(cb){
3636
return $injector.invoke(cb)
3737
}))
38-
.finally(function(){
38+
["finally"](function(){
3939
finishedBeforeCheck = true;
4040
if (handlePermission(next,permissions)) {
4141
waitForMe.resolve(true);

0 commit comments

Comments
 (0)