Compare commits

..

2 Commits

Author SHA1 Message Date
Sebastian McKenzie
44f6fc67f8 v1.13.1 2014-11-23 01:17:14 +11:00
Sebastian McKenzie
e4a3d222d6 fix constructor spread optimisation - thanks @zloirock 2014-11-23 01:16:09 +11:00
4 changed files with 10 additions and 6 deletions

View File

@@ -1,7 +1,11 @@
# 1.13.1
* Fix constructor spread optimisation. Thanks [@zloirock](https://github.com/zloirock).
# 1.13.0
* Put experimental ES7 features behind a flag `--experimental` and `experimental` option.
* Constructor speed performance increase. Thanks [@RReverser](https://github.com/RReverser).
* Constructor spread performance increase. Thanks [@RReverser](https://github.com/RReverser).
* Use `self` instead of `window` in the optional 6to5 runtime. Thanks [@RReverser](https://github.com/RReverser).
# 1.12.26

View File

@@ -1,5 +1,5 @@
(function (Constructor, args) {
var instance = Object.create(Constructor.prototype);
Constructor.apply(instance, args);
return instance;
var result = Constructor.apply(instance, args);
return result != null && (typeof result == "object" || typeof result == "function") ? result : instance;
});

View File

@@ -1,7 +1,7 @@
{
"name": "6to5",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "1.13.0",
"version": "1.13.1",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://github.com/6to5/6to5",
"repository": {

View File

@@ -3,9 +3,9 @@
var _applyConstructor = function (Constructor, args) {
var instance = Object.create(Constructor.prototype);
Constructor.apply(instance, args);
var result = Constructor.apply(instance, args);
return instance;
return result != null && (typeof result == "object" || typeof result == "function") ? result : instance;
};
_applyConstructor(Numbers, Array.from(nums));