Skip to content
Snippets Groups Projects
Unverified Commit c2edb3b3 authored by Michael J. Giarlo's avatar Michael J. Giarlo Committed by GitHub
Browse files

Merge pull request #3449 from ProjectMirador/asArray

Consolidate implementations of asArray
parents 22b20184 e03053dd
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