mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Use string.charAt(n) instead of string[n]
Safari doesn't seem to like the string indices in some circumstances
This commit is contained in:
parent
5e6e03f3f3
commit
1b2cdf9cd0
@ -241,15 +241,15 @@ Returns the new start position, after the parsed operation
|
||||
function parseFilterOperation(operators,filterString,p) {
|
||||
var operator, operand, bracketPos;
|
||||
// Skip the starting square bracket
|
||||
if(filterString[p++] !== "[") {
|
||||
if(filterString.charAt(p++) !== "[") {
|
||||
throw "Missing [ in filter expression";
|
||||
}
|
||||
// Process each operator in turn
|
||||
do {
|
||||
operator = {};
|
||||
// Check for an operator prefix
|
||||
if(filterString[p] === "!") {
|
||||
operator.prefix = filterString[p++];
|
||||
if(filterString.charAt(p) === "!") {
|
||||
operator.prefix = filterString.charAt(p++);
|
||||
}
|
||||
// Get the operator name
|
||||
bracketPos = filterString.indexOf("[",p);
|
||||
@ -270,9 +270,9 @@ function parseFilterOperation(operators,filterString,p) {
|
||||
p = bracketPos + 1;
|
||||
// Push this operator
|
||||
operators.push(operator);
|
||||
} while(filterString[p] !== "]");
|
||||
} while(filterString.charAt(p) !== "]");
|
||||
// Skip the ending square bracket
|
||||
if(filterString[p++] !== "]") {
|
||||
if(filterString.charAt(p++) !== "]") {
|
||||
throw "Missing ] in filter expression";
|
||||
}
|
||||
// Return the parsing position
|
||||
|
Loading…
Reference in New Issue
Block a user