Created
November 30, 2015 15:04
-
-
Save lloydwatkin/c03121764e863bf7c30b to your computer and use it in GitHub Desktop.
Babel-ified code works in Chrome but not Chromium (37)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_getItemIdStrs() { | |
const result = [] | |
const itemIdStrings = Object.keys(this.state) | |
for (const itemIdStr of itemIdStrings) { | |
if (itemIdStr !== 'groups') { | |
result.push(itemIdStr) | |
} | |
} | |
return result | |
} | |
/* Gets transpiled to: */ | |
{ | |
key: '_getItemIdStrs', | |
value: function _getItemIdStrs() { | |
var result = []; | |
var _iteratorNormalCompletion = true; | |
var _didIteratorError = false; | |
var _iteratorError = undefined; | |
try { | |
for (var _iterator = Object.keys(this.state)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | |
var itemIdStr = _step.value; | |
if (itemIdStr !== 'groups') { | |
result.push(itemIdStr); | |
} | |
} | |
} catch (err) { | |
_didIteratorError = true; | |
_iteratorError = err; | |
} finally { | |
try { | |
if (!_iteratorNormalCompletion && _iterator['return']) { | |
_iterator['return'](); | |
} | |
} finally { | |
if (_didIteratorError) { | |
throw _iteratorError; | |
} | |
} | |
} | |
return result; | |
} | |
/* Gets 'undefined' is not a function at line 23 at Object.keys(this.state)[Symbol.iterator]() (specifically the Symbol.iterator key function call) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment