diff --git a/lib/index.js b/lib/index.js index 9a49af2..46d38ce 100644 --- a/lib/index.js +++ b/lib/index.js @@ -9,10 +9,6 @@ const node = require('when/node') const posthtml = require('posthtml') const loader = require('posthtml-loader') -const isArray = (obj) => { - return Object.prototype.toString.call(obj) === '[object Array]' -}; - class Contentful { constructor (opts) { const validatedOptions = validate(opts) @@ -132,7 +128,7 @@ function recursiveTransform (obj, key) { return obj } - if (isArray(obj)) { + if (Array.isArray(obj)) { return obj.map(o => recursiveTransform(o)) } diff --git a/package.json b/package.json index 99023f3..9d4c468 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "spike-contentful", "description": "Contentful CMS plugin for spike", - "version": "0.2.0", + "version": "0.1.2", "author": "Tom Milewski", "ava": { "verbose": "true",