Skip to content

Commit a04fe52

Browse files
committed
add missing length() method for KeyedCollection
1 parent c974e10 commit a04fe52

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

js/src/_base/RendererPool.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ _.extend(KeyedCollection.prototype, {
5555
}
5656
return null;
5757
},
58+
59+
length: function() {
60+
return this._collection.length;
61+
},
5862
});
5963

6064
function RendererPool() {
@@ -94,7 +98,7 @@ _.extend(RendererPool.prototype, {
9498
var renderer;
9599
console.debug('RendererPool.acquiring...');
96100

97-
if (this.freePool.length > 0) {
101+
if (this.freePool.length() > 0) {
98102

99103
renderer = this.freePool.pop(config);
100104
if (!renderer) {

0 commit comments

Comments
 (0)