diff --git a/src/tabs/getItemString.js b/src/tabs/getItemString.js index 04ebbbd..1117e83 100644 --- a/src/tabs/getItemString.js +++ b/src/tabs/getItemString.js @@ -5,12 +5,13 @@ import getType from '../utils/getType'; import type { StylingFunction } from 'react-base16-styling'; function getShortTypeString(val: any, diff?: boolean): string { - const type = getType(val); if (diff && Array.isArray(val)) { val = val[val.length === 2 ? 1 : 0]; } + const type = getType(val); + switch (type) { case 'Immutable List': case 'Immutable Stack': diff --git a/src/types.js b/src/types.js index abf25fd..d986b09 100644 --- a/src/types.js +++ b/src/types.js @@ -1,3 +1,5 @@ +// @noflow + export type Action = { timestamp: Date, error: ?string