We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcba897 commit 7ad6e30Copy full SHA for 7ad6e30
src/v1/internal/bookmark.js
@@ -90,10 +90,13 @@ function asStringArray(value) {
90
const result = [];
91
for (let i = 0; i < value.length; i++) {
92
const element = value[i];
93
- if (!util.isString(element)) {
94
- throw new TypeError(`Bookmark should be a string, given: '${element}'`);
+ // if it is undefined or null, ignore it
+ if (element !== undefined && element !== null) {
95
+ if (!util.isString(element)) {
96
+ throw new TypeError(`Bookmark should be a string, given: '${element}'`);
97
+ }
98
+ result.push(element);
99
}
- result.push(element);
100
101
return result;
102
0 commit comments