Skip to content

Instantly share code, notes, and snippets.

@nfcampos
Created April 18, 2016 12:27
Show Gist options
  • Save nfcampos/216edf34ae47dfff809df41c58b58c8f to your computer and use it in GitHub Desktop.
Save nfcampos/216edf34ae47dfff809df41c58b58c8f to your computer and use it in GitHub Desktop.
_len is not defined
{
"presets": [
"es2015"
],
"plugins": [
"react-hot-loader/babel"
]
}
export function spread(...args) {
return args.push(1)
}
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.spread = spread;
function spread() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return args.push(1);
}
(function () {
function tagSource(fn, localName) {
if (typeof fn !== "function") {
return;
}
if (fn.hasOwnProperty("__source")) {
return;
}
try {
Object.defineProperty(fn, "__source", {
enumerable: false,
configurable: true,
value: {
fileName: "abc.js",
localName: localName
}
});
} catch (err) {}
}
tagSource(spread, "spread");
tagSource(_len, "_len");
tagSource(args, "args");
tagSource(_key, "_key");
})();
@0x80
Copy link

0x80 commented Apr 18, 2016

I'm having the same issue at tagSource(_len, '_len');, where _len is only defined in a for loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment