Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 353b07f

Browse files
author
Mariah Hanson
committed
Fixing order of typechecking and value reassignment
1 parent 5202f01 commit 353b07f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/tabs/getItemString.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ import getType from '../utils/getType';
55
import type { StylingFunction } from 'react-base16-styling';
66

77
function getShortTypeString(val: any, diff?: boolean): string {
8-
const type = getType(val);
98

109
if (diff && Array.isArray(val)) {
1110
val = val[val.length === 2 ? 1 : 0];
1211
}
1312

13+
const type = getType(val);
14+
1415
switch (type) {
1516
case 'Immutable List':
1617
case 'Immutable Stack':

src/types.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @noflow
2+
13
export type Action = {
24
timestamp: Date,
35
error: ?string

0 commit comments

Comments
 (0)