dist/ember.js in ember-source-2.8.2 vs dist/ember.js in ember-source-2.8.3
- old
+ new
@@ -4,11 +4,11 @@
* @copyright Copyright 2011-2016 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.8.2
+ * @version 2.8.3
*/
var enifed, requireModule, require, Ember;
var mainContext = this;
@@ -10363,11 +10363,11 @@
* on top of the closure component attributes.
*
*/
var newAttrs = _emberMetalAssign.default(new _emberMetalEmpty_object.default(), attrs);
_emberHtmlbarsKeywordsClosureComponent.processPositionalParamsFromCell(componentCell, params, newAttrs);
- attrs = _emberHtmlbarsKeywordsClosureComponent.mergeInNewHash(componentCell[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_HASH], newAttrs, componentCell[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_POSITIONAL_PARAMS], params);
+ attrs = _emberHtmlbarsKeywordsClosureComponent.mergeInNewHash(componentCell[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_HASH], newAttrs, env, componentCell[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_POSITIONAL_PARAMS], params);
params = [];
}
}
// Determine if this is an initial render or a re-render.
@@ -10925,11 +10925,11 @@
if (_emberHtmlbarsSystemLookupHelper.CONTAINS_DOT_CACHE.get(path)) {
var stream = env.hooks.get(env, scope, path);
var componentCell = stream.value();
if (_emberHtmlbarsKeywordsClosureComponent.isComponentCell(componentCell)) {
- var closureAttrs = _emberHtmlbarsKeywordsClosureComponent.mergeInNewHash(componentCell[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_HASH], hash);
+ var closureAttrs = _emberHtmlbarsKeywordsClosureComponent.mergeInNewHash(componentCell[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_HASH], hash, env);
for (var key in closureAttrs) {
_emberHtmlbarsUtilsSubscribe.default(renderNode, env, scope, closureAttrs[key]);
}
}
@@ -11784,11 +11784,11 @@
_emberMetalDebug.assert('Component path cannot be null in ' + label, !_emberMetalIs_none.default(componentPath));
var newHash = _emberMetalAssign.default(new _emberMetalEmpty_object.default(), hash);
if (isComponentCell(componentPath)) {
- return createNestedClosureComponentCell(componentPath, params, newHash);
+ return createNestedClosureComponentCell(componentPath, params, newHash, env);
} else {
_emberMetalDebug.assert('The component helper cannot be used without a valid component name. You used "' + componentPath + '" via ' + label, isValidComponentPath(env, componentPath));
return createNewClosureComponentCell(env, componentPath, params, newHash);
}
}
@@ -11801,17 +11801,17 @@
function isComponentCell(component) {
return component && component[COMPONENT_CELL];
}
- function createNestedClosureComponentCell(componentCell, params, hash) {
+ function createNestedClosureComponentCell(componentCell, params, hash, env) {
var _ref;
// This needs to be done in each nesting level to avoid raising assertions.
processPositionalParamsFromCell(componentCell, params, hash);
- return _ref = {}, _ref[COMPONENT_PATH] = componentCell[COMPONENT_PATH], _ref[COMPONENT_SOURCE] = componentCell[COMPONENT_SOURCE], _ref[COMPONENT_HASH] = mergeInNewHash(componentCell[COMPONENT_HASH], hash, componentCell[COMPONENT_POSITIONAL_PARAMS], params), _ref[COMPONENT_POSITIONAL_PARAMS] = componentCell[COMPONENT_POSITIONAL_PARAMS], _ref[COMPONENT_CELL] = true, _ref;
+ return _ref = {}, _ref[COMPONENT_PATH] = componentCell[COMPONENT_PATH], _ref[COMPONENT_SOURCE] = componentCell[COMPONENT_SOURCE], _ref[COMPONENT_HASH] = mergeInNewHash(componentCell[COMPONENT_HASH], hash, env, componentCell[COMPONENT_POSITIONAL_PARAMS], params), _ref[COMPONENT_POSITIONAL_PARAMS] = componentCell[COMPONENT_POSITIONAL_PARAMS], _ref[COMPONENT_CELL] = true, _ref;
}
function processPositionalParamsFromCell(componentCell, params, hash) {
var positionalParams = componentCell[COMPONENT_POSITIONAL_PARAMS];
@@ -11881,19 +11881,22 @@
*
* Therefore, if there are no positional parameters and `positionalParams` is
* a string (rest positional parameters), we keep the parameters from the
* `original` hash.
*
+ * Now we need to consider also the case where the positional params are being
+ * passed as a named parameter.
+ *
*/
- function mergeInNewHash(original, updates) {
- var positionalParams = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2];
- var params = arguments.length <= 3 || arguments[3] === undefined ? [] : arguments[3];
+ function mergeInNewHash(original, updates, env) {
+ var positionalParams = arguments.length <= 3 || arguments[3] === undefined ? [] : arguments[3];
+ var params = arguments.length <= 4 || arguments[4] === undefined ? [] : arguments[4];
var newHash = _emberMetalAssign.default({}, original, updates);
- if (_emberHtmlbarsUtilsExtractPositionalParams.isRestPositionalParams(positionalParams) && _emberMetalIs_empty.default(params)) {
+ if (_emberHtmlbarsUtilsExtractPositionalParams.isRestPositionalParams(positionalParams) && _emberMetalIs_empty.default(params) && _emberMetalIs_empty.default(env.hooks.getValue(updates[positionalParams]))) {
var propName = positionalParams;
newHash[propName] = original[propName];
}
return newHash;
@@ -12283,11 +12286,11 @@
if (_emberHtmlbarsKeywordsClosureComponent.isComponentCell(path)) {
var closureComponent = env.hooks.getValue(path);
// This needs to be done in each nesting level to avoid raising assertions
_emberHtmlbarsKeywordsClosureComponent.processPositionalParamsFromCell(closureComponent, params, hash);
- hash = _emberHtmlbarsKeywordsClosureComponent.mergeInNewHash(closureComponent[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_HASH], hash, closureComponent[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_POSITIONAL_PARAMS], params);
+ hash = _emberHtmlbarsKeywordsClosureComponent.mergeInNewHash(closureComponent[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_HASH], hash, env, closureComponent[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_POSITIONAL_PARAMS], params);
params = [];
env = env.childWithMeta(_emberMetalAssign.default({}, env.meta, { moduleName: closureComponent[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_SOURCE] }));
}
var templates = { default: template, inverse: inverse };
@@ -14657,16 +14660,16 @@
view.trigger('didDestroyElement');
}
};
Renderer.prototype._register = function Renderer_register(view) {
- _emberMetalDebug.assert('Attempted to register a view with an id already in use: ' + view.elementId, !this._viewRegistry[this.elementId]);
+ _emberMetalDebug.assert('Attempted to register a view with an id already in use: ' + view.elementId, !this._viewRegistry[view.elementId]);
this._viewRegistry[view.elementId] = view;
};
Renderer.prototype._unregister = function Renderer_unregister(view) {
- delete this._viewRegistry[this.elementId];
+ delete this._viewRegistry[view.elementId];
};
var InertRenderer = {
create: function (_ref2) {
var dom = _ref2.dom;
@@ -23918,16 +23921,17 @@
@param {Object} [target] target object to use as the context when invoking a method.
@param {String|Function} method The method to invoke. If you pass a string it
will be resolved on the target object at the time the scheduled item is
invoked allowing you to change the target function.
@param {Object} [arguments*] Optional arguments to be passed to the queued method.
- @return {void}
+ @return {*} Timer information for use in cancelling, see `run.cancel`.
@public
*/
run.schedule = function () /* queue, target, method */{
_emberMetalDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run.currentRunLoop || !_emberMetalTesting.isTesting());
- backburner.schedule.apply(backburner, arguments);
+
+ return backburner.schedule.apply(backburner, arguments);
};
// Used by global test teardown
run.hasScheduledTimers = function () {
return backburner.hasTimers();
@@ -44525,10 +44529,10 @@
*/
});
enifed("ember/version", ["exports"], function (exports) {
"use strict";
- exports.default = "2.8.2";
+ exports.default = "2.8.3";
});
enifed('htmlbars-runtime', ['exports', 'htmlbars-runtime/hooks', 'htmlbars-runtime/render', 'htmlbars-util/morph-utils', 'htmlbars-util/template-utils'], function (exports, _htmlbarsRuntimeHooks, _htmlbarsRuntimeRender, _htmlbarsUtilMorphUtils, _htmlbarsUtilTemplateUtils) {
'use strict';
var internal = {