Skip to content

Commit

Permalink
newName -> formattedName
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Aug 11, 2016
1 parent aa4f36d commit 2ed5b39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caravel/assets/javascripts/modules/caravel.js
Expand Up @@ -10,8 +10,8 @@ import vizMap from '../../visualizations/main.js';
const px = function () {
let slice;
function getParam(name) {
const newName = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
const regex = new RegExp('[\\?&]' + newName + '=([^&#]*)');
const formattedName = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
const regex = new RegExp('[\\?&]' + formattedName + '=([^&#]*)');
const results = regex.exec(location.search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
}
Expand Down

0 comments on commit 2ed5b39

Please sign in to comment.