Skip to content

Commit bb54095

Browse files
committed
addItems returns empty array if no items;
fixes desandro/masonry#401 tick version 1.1.7
1 parent 2c4b629 commit bb54095

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "outlayer",
3-
"version": "1.1.6",
3+
"version": "1.1.7",
44
"description": "the brains and guts of a layout library",
55
"main": [
66
"item.js",

outlayer.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Outlayer v1.1.6
2+
* Outlayer v1.1.7
33
* the brains and guts of a layout library
44
*/
55

@@ -694,11 +694,10 @@ Outlayer.prototype.resize = function() {
694694
**/
695695
Outlayer.prototype.addItems = function( elems ) {
696696
var items = this._itemize( elems );
697-
if ( !items.length ) {
698-
return;
699-
}
700697
// add items to collection
701-
this.items = this.items.concat( items );
698+
if ( items.length ) {
699+
this.items = this.items.concat( items );
700+
}
702701
return items;
703702
};
704703

0 commit comments

Comments
 (0)