mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 21:17:03 +00:00
Fixed: optimize access to object property
Accessing a property via dot notation is faster than indexing via a string.
This commit is contained in:
@@ -350,7 +350,7 @@ var CPBindingOperationAnd = 0,
|
||||
var placeholder = _placeholderForMarker[[aMarker UID]];
|
||||
|
||||
if (placeholder)
|
||||
return placeholder['value'];
|
||||
return placeholder.value;
|
||||
|
||||
return nil;
|
||||
}
|
||||
@@ -362,7 +362,7 @@ var CPBindingOperationAnd = 0,
|
||||
var existingPlaceholder = _placeholderForMarker[[aMarker UID]];
|
||||
|
||||
// Don't overwrite an explicitly set placeholder with a default.
|
||||
if (existingPlaceholder && !existingPlaceholder['isDefault'])
|
||||
if (existingPlaceholder && !existingPlaceholder.isDefault)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user