mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-30 03:48:49 +00:00
Various fixes to support creating images with specifying the size upfront.
[#41 milestone:0.5.2 state:resolved]; [#20 milestone:0.5.2 state:resolved];
This commit is contained in:
1 parent
53d4a714e2
commit
e95c2b9efc
3 files changed
+49
-23
No files matched your search
@@ -219,7 +219,7 @@ var _CPNotificationCenterPostNotification = function(/* CPNotificationCenter */
|
||||
while (key = [keys nextObject])
|
||||
{
|
||||
var observers = [_objectObservers objectForKey:key],
|
||||
count = observers.length;
|
||||
count = observers ? observers.length : 0;
|
||||
|
||||
while (count--)
|
||||
if ([observers[count] observer] == anObserver)
|
||||
@@ -231,7 +231,7 @@ var _CPNotificationCenterPostNotification = function(/* CPNotificationCenter */
|
||||
observers.splice(count, 1);
|
||||
}
|
||||
|
||||
if (observers.length == 0)
|
||||
if (!observers || observers.length == 0)
|
||||
removedKeys.push(key);
|
||||
}
|
||||
}
|
||||
@@ -239,7 +239,7 @@ var _CPNotificationCenterPostNotification = function(/* CPNotificationCenter */
|
||||
{
|
||||
var key = [anObject hash],
|
||||
observers = [_objectObservers objectForKey:key];
|
||||
count = observers.length;
|
||||
count = observers ? observers.length : 0;
|
||||
|
||||
while (count--)
|
||||
if ([observers[count] observer] == anObserver)
|
||||
@@ -251,7 +251,7 @@ var _CPNotificationCenterPostNotification = function(/* CPNotificationCenter */
|
||||
observers.splice(count, 1)
|
||||
}
|
||||
|
||||
if (observers.length == 0)
|
||||
if (!observers || observers.length == 0)
|
||||
removedKeys.push(key);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user