Skip to content

Commit 49449cd

Browse files
committed
Fix CS, should fix #67
1 parent dfeedac commit 49449cd

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Resources/js/router.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fos.Router.prototype.getHost = function() {
100100
fos.Router.prototype.buildQueryParams = function(prefix, params, add) {
101101
var self = this;
102102
var name;
103-
var rbracket = new RegExp('/\[\]$/');
103+
var rbracket = new RegExp(/\[\]$/);
104104

105105
if (params instanceof Array) {
106106
goog.array.forEach(params, function(val, i) {
@@ -164,8 +164,7 @@ fos.Router.prototype.generate = function(name, opt_params, absolute) {
164164

165165
if ('variable' === token[0]) {
166166
var hasDefault = goog.object.containsKey(route.defaults, token[3]);
167-
if (false === optional || !hasDefault
168-
|| (goog.object.containsKey(params, token[3]) && params[token[3]] != route.defaults[token[3]])) {
167+
if (false === optional || !hasDefault || (goog.object.containsKey(params, token[3]) && params[token[3]] != route.defaults[token[3]])) {
169168
var value;
170169
if (goog.object.containsKey(params, token[3])) {
171170
value = params[token[3]];
@@ -222,7 +221,7 @@ fos.Router.prototype.generate = function(name, opt_params, absolute) {
222221
value = (typeof value === 'function') ? value() : value;
223222

224223
// change null to empty string
225-
value = (value == null) ? '' : value;
224+
value = (value === null) ? '' : value;
226225

227226
queryParams.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
228227
};

Resources/public/js/router.js

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

0 commit comments

Comments
 (0)