From 8de0e32ebe50de20eecf762a29d5f740648b7510 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Wed, 9 Aug 2017 09:08:25 -0700 Subject: [PATCH] [postcss] fix `isObject` helper - Closes #295 --- packages/postcss/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/postcss/index.js b/packages/postcss/index.js index fb75fde6..23259ec4 100644 --- a/packages/postcss/index.js +++ b/packages/postcss/index.js @@ -7,7 +7,7 @@ const base = { plugins:[], options:{} }; const filenames = ['.postcssrc', '.postcssrc.js', 'postcss.config.js', 'package.json']; const isString = any => typeof any === 'string'; -const isObject = any => Boolean(any) && (any.constructor === Object); +const isObject = any => !!any && typeof any === 'object' && !Array.isArray(any); const isEmptyObj = any => isObject(any) && Object.keys(any).length === 0; module.exports = function (task, utils) {