anselmh/object-fit — pull request #10 by xax (2014-08-07 00:14:16+00:00)
Title: Fix array-detection of arguments to objectFill.init.

You want to enable the passing of an array of `selector` / `fittype` definitions to `objectFit.polyfill`. If a lone object `{ selector: 'img', fittype: 'cover' }`is passed, you wrap the object into an array.

As code to determin if it is an array already that is passed, in `.init` you use `if (typeof args !== 'Array') {…` – but that won't do it, as a JS array has `typeof [] === 'object'`. Thus I propose tio change the test to `… instanceof Array`.

(There are some EOL-whitespace diffs in this pull request – sorry about that.)