From 580e59a44ab1d19071ad7f46026aa1ed881935ba Mon Sep 17 00:00:00 2001 From: mg901 Date: Tue, 22 Jan 2019 14:23:44 +0300 Subject: [PATCH] fix(helpers): fix flow-types --- src/helpers.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers.js b/src/helpers.js index 656fb2b6..8bf72869 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -1,4 +1,5 @@ // @flow + import { DEFAULT_BREAKS } from './constants'; import type { BreakpointsMap, @@ -23,8 +24,8 @@ export const makeErrorMessage = ( breaks, ).join(', ')}'.`; -const isString = (value: any) => typeof value === 'string'; -const isObject = (value: any) => +const isString = (value: mixed) => typeof value === 'string'; +const isObject = (value: mixed) => Object.prototype.toString.call(value).slice(8, -1) === 'Object'; type SetDefaultTheme = (OptionalBreakpoints) => ExactBreakpoints;