Permalink
Browse files

Consolidated destination flag variable [skip ci]

  • Loading branch information...
1 parent ae51e25 commit 2b7764c484ef88b2427550bba4c31daa1f4b6525 @bemson committed Feb 26, 2014
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/salt.js
View
@@ -30,6 +30,7 @@
return obj instanceof Array;
},
tokenPrefix = '@',
+ queryDestinationFlag = '>',
defaultPermissions = {world: true, owner: true, sub: true, self: true},
redirectFlag = 1,
// regexps
@@ -377,7 +378,7 @@
;
if (exists && (typeofTagValue = typeof (tagValue = tags[tagName])) !== 'function') {
if (typeofTagValue === 'string' && tagValue.length) {
- if (tagValue.charAt(0) === '>') {
+ if (tagValue.charAt(0) === queryDestinationFlag) {
useTarget = 1;
}
tgtIdx = pkg.indexOf(tagValue, node);
@@ -444,7 +445,7 @@
node.nxtc = 0;
if (exists) {
- if (typeof (tagValue = tags[tagName]) === 'string' && tagValue.charAt(0) === '>') {
+ if (typeof (tagValue = tags[tagName]) === 'string' && tagValue.charAt(0) === queryDestinationFlag) {
// flag that this will clear existing waypoints
node.nxtc = 1;
}
@@ -1965,7 +1966,7 @@
case 'string':
// remove redirect flag
- if (qry.charAt(0) === '>') {
+ if (qry.charAt(0) === queryDestinationFlag) {
qry = qry.substr(1);
}

0 comments on commit 2b7764c

Please sign in to comment.