Skip to content
Snippets Groups Projects
Commit e03053dd authored by Chris Beer's avatar Chris Beer
Browse files

Consolidate implementations of asArray

parent 0f6b3cf6
No related branches found
No related tags found
No related merge requests found
......@@ -13,21 +13,12 @@ import {
} from '@material-ui/core';
import ArrowBackIcon from '@material-ui/icons/ArrowBackSharp';
import Skeleton from '@material-ui/lab/Skeleton';
import asArray from '../lib/asArray';
import { LabelValueMetadata } from './LabelValueMetadata';
import CollapsibleSection from '../containers/CollapsibleSection';
import ScrollIndicatedDialogContent from '../containers/ScrollIndicatedDialogContent';
import ManifestInfo from '../containers/ManifestInfo';
/**
*/
function asArray(value) {
if (!Array.isArray(value)) {
return [value];
}
return value;
}
/**
* a dialog providing the possibility to select the collection
*/
......
import { Utils } from 'manifesto.js';
import MiradorManifest from './MiradorManifest';
import MiradorCanvas from './MiradorCanvas';
/** */
function asArray(value) {
if (value === undefined) return [];
return Array.isArray(value) ? value : [value];
}
import asArray from './asArray';
/** */
function isLevel0ImageProfile(service) {
......
/**
*/
export default function asArray(value) {
if (value === undefined) return [];
if (!Array.isArray(value)) {
return [value];
}
return value;
}
......@@ -3,6 +3,7 @@ import createCachedSelector from 're-reselect';
import { PropertyValue } from 'manifesto.js/dist-esmodule/PropertyValue';
import { Utils } from 'manifesto.js/dist-esmodule/Utils';
import getThumbnail from '../../lib/ThumbnailFactory';
import asArray from '../../lib/asArray';
import { getCompanionWindow } from './companionWindows';
import { getManifest } from './getters';
import { getConfig } from './config';
......@@ -109,16 +110,6 @@ export const getManifestProvider = createSelector(
&& PropertyValue.parse(provider[0].label, locale).getValue(),
);
/**
*/
function asArray(value) {
if (!Array.isArray(value)) {
return [value];
}
return value;
}
/**
* Return the IIIF v3 homepage of a manifest or null
* @param {object} state
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment