From c4b33fbdadb31ea85cbb16fa84b91c8fccb6560d Mon Sep 17 00:00:00 2001 From: i10k Date: Sat, 22 Oct 2016 21:15:03 +0300 Subject: [PATCH] Use ['default'] property accessor, not .default Using reserved words in dot property accessors is allowed in ES5, but not in ES3. Android 2 throws `SyntaxError: Parse error` with `.default` --- lib/assets/javascripts/react_ujs_mount.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/assets/javascripts/react_ujs_mount.js b/lib/assets/javascripts/react_ujs_mount.js index 141ac1663..06501802e 100644 --- a/lib/assets/javascripts/react_ujs_mount.js +++ b/lib/assets/javascripts/react_ujs_mount.js @@ -59,8 +59,8 @@ } // Lastly, if there is a default attribute try that - if (constructor && constructor.default) { - constructor = constructor.default; + if (constructor && constructor['default']) { + constructor = constructor['default']; } return constructor;