Fixed review comments
This commit is contained in:
parent
57a0cd7713
commit
d36a8994fb
3 changed files with 11 additions and 6 deletions
|
@ -132,6 +132,7 @@ module.exports = {
|
||||||
'Object.getOwnPropertyDescriptor',
|
'Object.getOwnPropertyDescriptor',
|
||||||
'Object.getPrototypeOf',
|
'Object.getPrototypeOf',
|
||||||
'Object.keys',
|
'Object.keys',
|
||||||
|
'Object.entries',
|
||||||
'Object.getOwnPropertyNames',
|
'Object.getOwnPropertyNames',
|
||||||
'Function.name',
|
'Function.name',
|
||||||
'Function.hasInstance',
|
'Function.hasInstance',
|
||||||
|
|
|
@ -75,10 +75,15 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param params {Record<string, string | number | boolean>}
|
||||||
|
* @returns {string} Query string
|
||||||
|
*/
|
||||||
function paramsToString(params) {
|
function paramsToString(params) {
|
||||||
return Object.keys(params)
|
return Object.entries(params)
|
||||||
.filter((k) => !!params[k])
|
// eslint-disable-next-line no-unused-vars
|
||||||
.map(k => `${encodeURIComponent(k)}=${encodeURIComponent(params[k])}`)
|
.filter(([_, v]) => v !== null && v !== undefined)
|
||||||
|
.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
|
||||||
.join('&');
|
.join('&');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,8 @@ class BackdropScreensaver {
|
||||||
|
|
||||||
if (result.Items.length) {
|
if (result.Items.length) {
|
||||||
|
|
||||||
import('slideshow').then(slideshow => {
|
import('slideshow').then(({default: Slideshow}) => {
|
||||||
|
const newSlideShow = new Slideshow({
|
||||||
var newSlideShow = new slideshow({
|
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
cover: true,
|
cover: true,
|
||||||
items: result.Items
|
items: result.Items
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue