Skip to content

Commit a68bca0

Browse files
committed
Make JS IE friendly
replace startsWith and optional function arguments with IE friendly code
1 parent 2cec200 commit a68bca0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pagination.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function makePageLink(currentUrl, currentStart, start, linkText) {
1919
var tagStart = '<a href="';
2020
if (currentStart == start) {
2121
uri = "#";
22-
if (!linkText.toString().startsWith("&")) { // Don't modify arrows
22+
if (!linkText.toString().substring(0, 1) === "&") { // Don't modify arrows
2323
tagStart = '<a class="active" href="';
2424
}
2525
}

solr.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,15 @@ function showUrl(url) {
123123

124124

125125
// Passes search URL and callbacks to CORS function
126-
function searchSolr(query, coreArea="", start=0) {
126+
function searchSolr(query, coreArea, start) {
127127
var base = SOLR_CONFIG["server"];
128128
var fields = ["title",
129129
"origin",
130130
"datePublished",
131131
"resourceMap"].toString();
132132
var params = "fl=" + fields + "&defType=edismax&wt=json";
133133
var limit = "&rows=" + SOLR_CONFIG["limit"];
134+
if (start === undefined) start = "0";
134135
start = "&start=" + start;
135136
query = "&q=" + SOLR_CONFIG["filter"] + " " + query;
136137
if (coreArea && coreArea !== "any") {

0 commit comments

Comments
 (0)