Skip to content

Commit

Permalink
Use Array.isArray(); Revert version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
tmilewski committed Aug 8, 2016
1 parent 3a62a50 commit a29cd5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -132,7 +128,7 @@ function recursiveTransform (obj, key) {
return obj
}

if (isArray(obj)) {
if (Array.isArray(obj)) {
return obj.map(o => recursiveTransform(o))
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit a29cd5a

Please sign in to comment.