diff --git a/lib/leafeon.d.ts b/lib/leafeon.d.ts index fceb080..dba9bd8 100644 --- a/lib/leafeon.d.ts +++ b/lib/leafeon.d.ts @@ -35,7 +35,7 @@ declare class RouterRequest { */ exception: (message: string) => never; /** - * @function setURI + * @function windowListener * @param route string */ windowListener: (callback: Function) => void; diff --git a/lib/leafeon.js b/lib/leafeon.js index e006ce5..e2425ac 100644 --- a/lib/leafeon.js +++ b/lib/leafeon.js @@ -21,24 +21,14 @@ var RouterRequest = /** @class */ (function () { * @returns {string} */ this.getURI = function () { - if (typeof window !== 'undefined') { - return _this.URI = _this.formatPath(window.location.hash); - } - else { - return _this.URI = _this.formatPath(_this.windowObj.location.hash); - } + return _this.URI = _this.formatPath(_this.windowObj.location.hash); }; /** * @function setURI * @param route string */ this.setURI = function (route) { - if (typeof window !== 'undefined') { - window.location.hash = route; - } - else { - _this.windowObj.location.hash = route; - } + _this.windowObj.location.hash = route; }; /** * @function formatPath @@ -63,12 +53,12 @@ var RouterRequest = /** @class */ (function () { throw new TypeError(message); }; /** - * @function setURI + * @function windowListener * @param route string */ this.windowListener = function (callback) { if (typeof window !== 'undefined') { - window.onpopstate = function () { + window.onhashchange = function () { callback(); }; } @@ -260,6 +250,10 @@ var Router = /** @class */ (function (_super) { * @param afterRouteCallback */ _this.run = function (afterRouteCallback) { + _this.route = null; + _this.routeCall = null; + _this.params = []; + _this.notfound = true; var URI = _this.getURI(); var routes = []; // Execute before middleware @@ -308,13 +302,13 @@ var Router = /** @class */ (function (_super) { _this.notfound = true; // While a route has not match the URI, set page as not found _this.routes = []; _this.paramsEnabled = false; + _this.route = null; _this.params = []; _this.beforeRouteMiddleware = '*'; - _this.routeCall = function () { }; - _this.beforeRouteMiddlewareFunc = function () { }; - _this.afterRouteCallback = function () { }; - _this.route = {}; - _this.notFoundCallback = function () { }; + _this.routeCall = null; + _this.beforeRouteMiddlewareFunc = null; + _this.afterRouteCallback = null; + _this.notFoundCallback = null; _this.windowListener(_this.run); return _this; } diff --git a/lib/leafeon.js.map b/lib/leafeon.js.map index 921db4a..1b61035 100644 --- a/lib/leafeon.js.map +++ b/lib/leafeon.js.map @@ -1 +1 @@ -{"version":3,"file":"leafeon.js","sourceRoot":"","sources":["../src/leafeon.ts"],"names":[],"mappings":";;;;;;;;;;;;AAQA;;GAEG;AACH;IAII;QAAA,iBAUC;QAED;;;WAGG;QACI,WAAM,GAAG;YACZ,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;gBACjC,OAAO,KAAI,CAAC,GAAG,GAAG,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aACzD;iBAAM;gBACL,OAAO,KAAI,CAAC,GAAG,GAAG,KAAI,CAAC,UAAU,CAAC,KAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aACjE;QACL,CAAC,CAAA;QAED;;;WAGG;QACI,WAAM,GAAG,UAAC,KAAa;YAC1B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;gBACjC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;aAC9B;iBAAM;gBACL,KAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;aACtC;QACL,CAAC,CAAA;QAED;;;;WAIG;QACI,eAAU,GAAG,UAAC,IAAY;YAC7B,IAAI,IAAI,KAAK,EAAE,EAAE;gBACf,OAAO,GAAG,CAAC;aACZ;YAED,IAAI,IAAI,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;gBACtE,KAAI,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC;aACnD;YAED,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC;QACtD,CAAC,CAAA;QAED;;;;WAIG;QACI,cAAS,GAAG,UAAC,OAAe;YAC/B,MAAM,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC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