Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Jul 23, 2014
1 parent 8c285de commit 1d41c62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions packages/ember-metal/lib/computed.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,9 @@ function computed(func) {
@return {Object} the cached value
*/
function cacheFor(obj, key) {
var meta = obj[META_KEY],
cache = meta && meta.cache,
ret = cache && cache[key];
var meta = obj[META_KEY];
var cache = meta && meta.cache;
var ret = cache && cache[key];

if (ret === UNDEFINED) { return undefined; }
return ret;
Expand Down
17 changes: 9 additions & 8 deletions packages/ember-runtime/lib/system/core_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,10 @@ CoreObject.PrototypeMixin = Mixin.create({
@return {String} string representation
*/
toString: function toString() {
var hasToStringExtension = typeof this.toStringExtension === 'function',
extension = hasToStringExtension ? ":" + this.toStringExtension() : '';
var hasToStringExtension = typeof this.toStringExtension === 'function';
var extension = hasToStringExtension ? ":" + this.toStringExtension() : '';
var ret = '<'+this.constructor.toString()+':'+guidFor(this)+extension+'>';

this.toString = makeToString(ret);
return ret;
}
Expand Down Expand Up @@ -738,8 +739,8 @@ var ClassMixin = Mixin.create({
@param key {String} property name
*/
metaForProperty: function(key) {
var meta = this.proto()[META_KEY],
desc = meta && meta.descs[key];
var meta = this.proto()[META_KEY];
var desc = meta && meta.descs[key];

Ember.assert("metaForProperty() could not find a computed property with key '"+key+"'.", !!desc && desc instanceof ComputedProperty);
return desc._meta || {};
Expand All @@ -754,10 +755,10 @@ var ClassMixin = Mixin.create({
@param {Object} binding
*/
eachComputedProperty: function(callback, binding) {
var proto = this.proto(),
descs = meta(proto).descs,
empty = {},
property;
var proto = this.proto();
var descs = meta(proto).descs;
var empty = {};
var property;

for (var name in descs) {
property = descs[name];
Expand Down

0 comments on commit 1d41c62

Please sign in to comment.