Skip to content

Commit

Permalink
params bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hij1nx committed Jun 3, 2011
1 parent 347f43f commit 4ec0053
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/Porter.js
Expand Up @@ -243,12 +243,15 @@
}
else {

var params = '';
var params = '', pcount = 0;

if(method === 'get') {
params = '?';
for(var d in data) {
if(self.cache.hasOwnProperty(d)) { params += encodeURIComponent(d) + "=" + encodeURIComponent(data[d]) + "&"; }
if(data.hasOwnProperty(d)) {
if(pcount===0) { params += '?'; }
params += encodeURIComponent(d) + "=" + encodeURIComponent(replace[d]) + "&";
pcount++;
}
}
}

Expand Down

0 comments on commit 4ec0053

Please sign in to comment.