-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@computed isn't converted to a computed property? #17
Comments
This is what the transpiled code looks like: define('rebelmail-campaign-manager/pods/components/bread-crumbs/component', ['exports', 'ember', 'ember-computed-decorators'], function (exports, Ember, computed) {
'use strict';
function _createDecoratedObject(descriptors) { var target = {}; for (var i = 0; i < descriptors.length; i++) { var descriptor = descriptors[i]; var decorators = descriptor.decorators; var key = descriptor.key; delete descriptor.key; delete descriptor.decorators; descriptor.enumerable = true; descriptor.configurable = true; descriptor.writable = true; if (decorators) { for (var f = 0; f < decorators.length; f++) { var decorator = decorators[f]; if (typeof decorator === 'function') { descriptor = decorator(target, key, descriptor) || descriptor; } else { throw new TypeError('The decorator for method ' + descriptor.key + ' is of the invalid type ' + typeof decorator); } } } if (descriptor.initializer) { descriptor.value = descriptor.initializer.call(target); Object.defineProperty(target, key, descriptor); } } return target; }
exports['default'] = Ember['default'].Component.extend(_createDecoratedObject([{
key: 'items',
initializer: function initializer() {
return null;
}
}, {
key: 'currentPath',
initializer: function initializer() {
return null;
}
}, {
key: 'breadCrumbs',
decorators: [computed['default']('items', 'currentPath')],
/* jshint ignore:end */
initializer: function initializer() {
return function (items, currentPath) {
var linkable = true;
return Ember['default'].A(items).map(function (item) {
var label = item.label;
var path = item.path;
var active = path === currentPath;
linkable = linkable && !active;
return { label: label, path: path, active: active, linkable: linkable };
});
};
}
}]));
/* jshint ignore:start */
}); |
ah, i think #master works correctly, but we are pending a release. Can you try master? |
Sweet, |
👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With this code using the latest released
ember-cli
(0.2.3
):I'm getting this error when trying to use
breadCrumbs
in an#each
:It's almost as if the transformation isn't being run? However, I do have the
es7.decorsators
optional transform enabled.The text was updated successfully, but these errors were encountered: