mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Use faster loop to handle prioritize in Base.filter()
This commit is contained in:
parent
3f76bd99ef
commit
34c57a47fa
1 changed files with 3 additions and 3 deletions
|
@ -351,12 +351,12 @@ Base.inject(/** @lends Base# */{
|
|||
// If there are prioritized keys, process them first.
|
||||
if (prioritize) {
|
||||
var keys = {};
|
||||
prioritize.forEach(function(key) {
|
||||
if (key in source) {
|
||||
for (var i = 0, key, l = prioritize.length; i < l; i++) {
|
||||
if ((key = prioritize[i]) in source) {
|
||||
handleKey(key);
|
||||
keys[key] = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
// Now reference the processed keys as processed, so that
|
||||
// handleKey() will not set them again below.
|
||||
processed = keys;
|
||||
|
|
Loading…
Reference in a new issue