Skip to content

Commit 3b526fb

Browse files
committed
fixed copy of assertion errors
1 parent 9f035e7 commit 3b526fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/assert.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ export default {
99
}
1010

1111
if ($element.length === 0) {
12-
throw new Error(`Element "${elementOrSelector}" not found for config option "${property}"`);
12+
throw new Error(`Element "${elementOrSelector}" not found for "${property}"`);
1313
}
1414
},
1515
anyElement(elementOrSelector, property) {
1616
const $element = $(elementOrSelector);
1717

1818
if ($element.length === 0) {
19-
throw new Error(`Element "${elementOrSelector}" not found for config option "${property}"`);
19+
throw new Error(`Element "${elementOrSelector}" not found for "${property}"`);
2020
}
2121
},
2222
warn(fn, ...args) {

src/next-handler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function nextHandler(pageIndex) {
88
let nextEl = $(ias.options.next, lastResponse)[0];
99

1010
if (!nextEl) {
11-
Assert.warn(Assert.singleElement, ias.options.next, 'next');
11+
Assert.warn(Assert.singleElement, ias.options.next, 'options.next');
1212

1313
return;
1414
}
@@ -28,7 +28,7 @@ export function nextHandler(pageIndex) {
2828
.then((hasNextEl) => {
2929
// only warn for first page, because at some point it's expected that there is no next element
3030
if (!hasNextEl && pageIndex <= 1 && console && console.warn) {
31-
console.warn(`Element "${ias.options.next}" not found for option "next" on "${data.url}"`)
31+
console.warn(`Element "${ias.options.next}" not found for "options.next" on "${data.url}"`)
3232
}
3333

3434
return hasNextEl;

0 commit comments

Comments
 (0)