Skip to content

Commit d09fda1

Browse files
committed
chore(release): 1.1.0
1 parent b7c78da commit d09fda1

File tree

8 files changed

+66
-63
lines changed

8 files changed

+66
-63
lines changed

.versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
2-
angular-meteor-auth@1.0.3
2+
angular-meteor-auth@1.1.0
33
44
55
@@ -32,7 +32,7 @@ [email protected]
3232
3333
3434
35-
local-test:angular-meteor-auth@1.0.3
35+
local-test:angular-meteor-auth@1.1.0
3636
3737
3838

dist/angular-meteor-auth.bundle.js

Lines changed: 45 additions & 50 deletions
Large diffs are not rendered by default.

dist/angular-meteor-auth.bundle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-meteor-auth.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! angular-meteor-auth v1.0.3 */
1+
/*! angular-meteor-auth v1.1.0 */
22
(function webpackUniversalModuleDefinition(root, factory) {
33
if(typeof exports === 'object' && typeof module === 'object')
44
module.exports = factory();
@@ -84,7 +84,7 @@ return /******/ (function(modules) { // webpackBootstrap
8484
};
8585

8686
function $$Auth() {
87-
var vm = arguments.length <= 0 || arguments[0] === undefined ? this : arguments[0];
87+
var vm = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this;
8888

8989
// Reset auth properties
9090
this.autorun(function () {
@@ -113,6 +113,15 @@ return /******/ (function(modules) { // webpackBootstrap
113113

114114
var deferred = this.$$defer();
115115

116+
// If user is already logged in resolve the promise immediately to prevent an
117+
// unnecessary computation
118+
if (this.currentUser) {
119+
deferred.resolve(this.currentUser);
120+
// Keep the schema of the promise consistent
121+
deferred.promise.stop = angular.noop;
122+
return deferred.promise;
123+
}
124+
116125
// Note the promise is being fulfilled in the next event loop to avoid
117126
// nested computations, otherwise the outer computation will cancel the
118127
// inner one once the scope has been destroyed which will lead to subscription
@@ -139,9 +148,8 @@ return /******/ (function(modules) { // webpackBootstrap
139148
return _this.$$afterFlush(deferred.reject, error);
140149
});
141150

142-
var promise = deferred.promise;
143-
promise.stop = computation.stop.bind(computation);
144-
return promise;
151+
deferred.promise.stop = computation.stop.bind(computation);
152+
return deferred.promise;
145153
};
146154

147155
// Calls a function with the provided args after flush

dist/angular-meteor-auth.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.

dist/angular-meteor-auth.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package.describe({
22
name: "angular-meteor-auth",
33
summary: "Angular-Meteor authentication module",
4-
version: "1.0.3",
4+
version: "1.1.0",
55
git: "https://github.com/urigo/angular-meteor-auth.git",
66
documentation: null
77
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-meteor-auth",
33
"main": "./dist/angular-meteor-auth.js",
4-
"version": "1.0.3",
4+
"version": "1.1.0",
55
"description": "Angular-Meteor authentication module",
66
"keywords": [
77
"AngularJS",

0 commit comments

Comments
 (0)