mathiasbynens / Array.from

A robust & optimized ES3-compatible polyfill for the `Array.from` method in ECMAScript 6.

Home Page:https://mths.be/array-from

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object doesn't support property or method 'from'

shinriyo opened this issue · comments

I installed and import 'array.from';
but
Object doesn't support property or method 'from' error.

What code did you get this error on? Note that Array.from is a static method; it's on Array, but NOT on individual arrays.

Separately, import 'array.from' is a no-op. If you want to shim the environment, import shim from 'array.from/shim'; shim().

You need to do:

import "array.from/auto";

according to the latest version of the es‑shim API, which this doesn’t yet implement (see also #53).

v1.1.0 will be released soon which should address any outstanding issues.