dist/ember.prod.js in ember-source-2.18.0 vs dist/ember.prod.js in ember-source-2.18.1
- old
+ new
@@ -4,11 +4,11 @@
* @copyright Copyright 2011-2017 Tilde Inc. and contributors
* Portions Copyright 2006-2011 Strobe Inc.
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
* @license Licensed under MIT license
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
- * @version 2.18.0
+ * @version 2.18.1
*/
/*global process */
var enifed, requireModule, Ember;
var mainContext = this; // Used in ember-environment/lib/global.js
@@ -10077,33 +10077,50 @@
};
}
return this._setTimeout(fn, executeAt);
};
- Backburner.prototype.throttle = function (target, method) /*, ...args, wait, [immediate] */{
+ Backburner.prototype.throttle = function (targetOrThisArgOrMethod) {
var _this2 = this,
_len4,
args,
_key4;
- for (_len4 = arguments.length, args = Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
- args[_key4 - 2] = arguments[_key4];
- }
-
- var immediate = args.pop();
+ var target = void 0;
+ var method = void 0;
+ var immediate = void 0;
var isImmediate = void 0;
var wait = void 0;
- if (isCoercableNumber(immediate)) {
- wait = immediate;
+
+ for (_len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
+ args[_key4 - 1] = arguments[_key4];
+ }
+
+ if (args.length === 1) {
+ method = targetOrThisArgOrMethod;
+ wait = args.pop();
+ target = null;
isImmediate = true;
} else {
- wait = args.pop();
- isImmediate = immediate === true;
+ target = targetOrThisArgOrMethod;
+ method = args.shift();
+ immediate = args.pop();
+ if (isString(method)) {
+ method = target[method];
+ } else if (!isFunction(method)) {
+ args.unshift(method);
+ method = target;
+ target = null;
+ }
+ if (isCoercableNumber(immediate)) {
+ wait = immediate;
+ isImmediate = true;
+ } else {
+ wait = args.pop();
+ isImmediate = immediate === true;
+ }
}
- if (isString(method)) {
- method = target[method];
- }
var index = findItem(target, method, this._throttlers);
if (index > -1) {
this._throttlers[index + 2] = args;
return this._throttlers[index + 3];
} // throttled
@@ -10125,34 +10142,51 @@
}
this._throttlers.push(target, method, args, timer);
return timer;
};
- Backburner.prototype.debounce = function (target, method) /* , wait, [immediate] */{
+ Backburner.prototype.debounce = function (targetOrThisArgOrMethod) {
var _this3 = this,
_len5,
args,
_key5,
timerId;
- for (_len5 = arguments.length, args = Array(_len5 > 2 ? _len5 - 2 : 0), _key5 = 2; _key5 < _len5; _key5++) {
- args[_key5 - 2] = arguments[_key5];
- }
-
- var immediate = args.pop();
+ var target = void 0;
+ var method = void 0;
+ var immediate = void 0;
var isImmediate = void 0;
var wait = void 0;
- if (isCoercableNumber(immediate)) {
- wait = immediate;
+
+ for (_len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
+ args[_key5 - 1] = arguments[_key5];
+ }
+
+ if (args.length === 1) {
+ method = targetOrThisArgOrMethod;
+ wait = args.pop();
+ target = null;
isImmediate = false;
} else {
- wait = args.pop();
- isImmediate = immediate === true;
+ target = targetOrThisArgOrMethod;
+ method = args.shift();
+ immediate = args.pop();
+ if (isString(method)) {
+ method = target[method];
+ } else if (!isFunction(method)) {
+ args.unshift(method);
+ method = target;
+ target = null;
+ }
+ if (isCoercableNumber(immediate)) {
+ wait = immediate;
+ isImmediate = false;
+ } else {
+ wait = args.pop();
+ isImmediate = immediate === true;
+ }
}
- if (isString(method)) {
- method = target[method];
- }
wait = parseInt(wait, 10);
// Remove debouncee
var index = findItem(target, method, this._debouncees);
if (index > -1) {
timerId = this._debouncees[index + 3];
@@ -19159,10 +19193,13 @@
this._renderRoots();
completedWithoutError = true;
} finally {
if (!completedWithoutError) {
this._lastRevision = _reference.CURRENT_TAG.value();
+ if (this._env.inTransaction === true) {
+ this._env.commit();
+ }
}
this._isRenderingRoots = false;
}
};
@@ -43857,10 +43894,10 @@
*/
});
enifed("ember/version", ["exports"], function (exports) {
"use strict";
- exports.default = "2.18.0";
+ exports.default = "2.18.1";
});
/*global enifed */
enifed('node-module', ['exports'], function(_exports) {
var IS_NODE = typeof module === 'object' && typeof module.require === 'function';
if (IS_NODE) {