From fde5ecbea7f8a8c261012d5bda51f2f83b00c062 Mon Sep 17 00:00:00 2001 From: Daniel Coulbourne Date: Sat, 17 Feb 2018 00:51:38 -0500 Subject: [PATCH] Build the assets, dummy. --- dist/js/route.js | 4 ++-- dist/js/route.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/js/route.js b/dist/js/route.js index 09e5f641..90d808f7 100644 --- a/dist/js/route.js +++ b/dist/js/route.js @@ -162,7 +162,7 @@ var Router = function (_String) { paramsArrayKey++; if (typeof tags[key] !== 'undefined') { delete this.queryParams[key]; - return tags[key].id || tags[key]; + return tags[key].id || encodeURIComponent(tags[key]); } if (tag.indexOf('?') === -1) { throw new Error('Ziggy Error: \'' + keyName + '\' key is required for route \'' + this.name + '\''); @@ -193,7 +193,7 @@ var Router = function (_String) { Object.keys(this.queryParams).forEach(function (key, i) { queryString = i === 0 ? queryString : queryString + '&'; - queryString += key + '=' + this.queryParams[key]; + queryString += key + '=' + encodeURIComponent(this.queryParams[key]); }.bind(this)); return queryString; diff --git a/dist/js/route.min.js b/dist/js/route.min.js index f6f211ca..6508adb8 100644 --- a/dist/js/route.min.js +++ b/dist/js/route.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("route",[],t):"object"==typeof exports?exports.route=t():e.route=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t,r){return new f(e,t,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var u=r(1),s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null,r=Object.keys(Ziggy.namedRoutes),n=r.filter(function(e){return new t(e).matchUrl()})[0];return e?e==n:n}},{key:"parse",value:function(){this.return=this.hydrateUrl()+this.constructQuery()}},{key:"url",value:function(){return this.parse(),this.return}},{key:"toString",value:function(){return this.url()}},{key:"valueOf",value:function(){return this.url()}}]),t}(String)},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null,r=Object.keys(Ziggy.namedRoutes),n=r.filter(function(e){return new t(e).matchUrl()})[0];return e?e==n:n}},{key:"parse",value:function(){this.return=this.hydrateUrl()+this.constructQuery()}},{key:"url",value:function(){return this.parse(),this.return}},{key:"toString",value:function(){return this.url()}},{key:"valueOf",value:function(){return this.url()}}]),t}(String)},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r