String::contains() -> indexOf() for Firefox 48 (and 38) compatibility
.contains() was removed in Firefox 48, but .includes() wasn't available until 40, so use indexOf() for now. We can start using .contains() once we no longer need to support 38 ESR.
This commit is contained in:
parent
315100e5ef
commit
72c8711cd3
3 changed files with 3 additions and 3 deletions
|
@ -145,7 +145,7 @@ Zotero.QuickCopy = new function() {
|
|||
|
||||
// Only concern ourselves with entries containing the current domain
|
||||
// or paths that apply to all domains
|
||||
if (!row.domainPath.contains(urlDomain[0]) && !row.domainPath.startsWith('/')) {
|
||||
if (!row.domainPath.indexOf(urlDomain[0]) != -1 && !row.domainPath.startsWith('/')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -1123,7 +1123,7 @@ Zotero.Search.prototype._buildQuery = Zotero.Promise.coroutine(function* () {
|
|||
let objectTypeClass = Zotero.DataObjectUtilities.getObjectsClassForObjectType(objectType);
|
||||
|
||||
// Old-style library-key hash
|
||||
if (objKey.contains('_')) {
|
||||
if (objKey.indexOf('_') != -1) {
|
||||
[objLibraryID, objKey] = objKey.split('_');
|
||||
}
|
||||
// libraryID assigned on search
|
||||
|
|
|
@ -172,7 +172,7 @@ function ZoteroProtocolHandler() {
|
|||
// search
|
||||
// items
|
||||
// item
|
||||
if (params.sort.contains('/')) {
|
||||
if (params.sort.indexOf('/') != -1) {
|
||||
let parts = params.sort.split('/');
|
||||
params.sort = parts[0];
|
||||
params.direction = parts[1] == 'd' ? 'desc' : 'asc';
|
||||
|
|
Loading…
Reference in a new issue