Object doesn't support property or method 'from'
shinriyo opened this issue · comments
shinriyo commented
I installed and import 'array.from';
but
Object doesn't support property or method 'from'
error.
Jordan Harband commented
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()
.
ExE Boss commented
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).
Jordan Harband commented
v1.1.0 will be released soon which should address any outstanding issues.