fix(images): no default removedView function in the selection bar (#498)
The default arrow was never called, so images-selection.mjs fell under its function coverage floor (97.29 < 98).
This commit is contained in:
@@ -51,7 +51,7 @@ function el(tag, text, className) {
|
||||
*/
|
||||
export function mountSelectionBar({ scope, api, grid, getItems, focusFallback, onCategorySet, activity = null, onTagged,
|
||||
getListing, getFilter, getCategories, checked: initial = Object.freeze(new Set()), collections = null,
|
||||
collection = null, onCollectionsChanged = null, onSourceChanged = null, onDeleted = null, removedView = () => false,
|
||||
collection = null, onCollectionsChanged = null, onSourceChanged = null, onDeleted = null, removedView = null,
|
||||
onReturn = null }) {
|
||||
let checked = initial;
|
||||
let exporting = false, categorizing = false;
|
||||
@@ -116,7 +116,7 @@ export function mountSelectionBar({ scope, api, grid, getItems, focusFallback, o
|
||||
}
|
||||
let shownRemoved = false;
|
||||
function paintMode() {
|
||||
const removed = Boolean(returnButton && removedView());
|
||||
const removed = Boolean(returnButton && removedView?.());
|
||||
if (removed === shownRemoved) return;
|
||||
shownRemoved = removed;
|
||||
for (const node of [...normalActions, returnButton]) node?.remove();
|
||||
|
||||
Reference in New Issue
Block a user