From 6e71e1e058ffb8dacdbc9a81c95e91f25f7f58c5 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Thu, 20 Apr 2017 18:00:12 -0700 Subject: [PATCH] [fix] attempt to avoid need for 'Array.from' polyfill Fix #409 --- docs/guides/getting-started.md | 3 +++ src/modules/NativeMethodsMixin/index.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/guides/getting-started.md b/docs/guides/getting-started.md index d40b8aa6..cf265f6e 100644 --- a/docs/guides/getting-started.md +++ b/docs/guides/getting-started.md @@ -1,5 +1,8 @@ # Getting started +It is recommended that your application provide a `Promise` and `Array.from` +polyfill. + ## Webpack and Babel [Webpack](webpack.js.org) is a popular build tool for web apps. Below is an diff --git a/src/modules/NativeMethodsMixin/index.js b/src/modules/NativeMethodsMixin/index.js index ee10a0f6..2febc3fc 100644 --- a/src/modules/NativeMethodsMixin/index.js +++ b/src/modules/NativeMethodsMixin/index.js @@ -69,7 +69,7 @@ const NativeMethodsMixin = { setNativeProps(nativeProps: Object) { // DOM state const node = findNodeHandle(this); - const classList = [...node.classList]; + const classList = Array.prototype.slice.call(node.classList); const domProps = createDOMProps(nativeProps, style => StyleRegistry.resolveStateful(style, classList)