diff --git a/signin.js b/signin.js index c2013fd..00e7829 100644 --- a/signin.js +++ b/signin.js @@ -61,7 +61,6 @@ class Signin extends EventEmitter Start( action, params, handler ) { - var request = new HttpRequest( this.conf.spec ); var _self = this; if( this.spec ) @@ -70,6 +69,14 @@ class Signin extends EventEmitter } else { + if( !this.conf.spec ) + { + var eArgs = new SignInEventArgs({ "success": false, "data": [] }); + handler( this, eArgs ); + return; + } + + var request = new HttpRequest( this.conf.spec ); request.addListener( "RequestComplete", function( sender, e ) { if( e.statusCode == 200 )