From 94198712261268b6a3ca92e85c4e51d469969dae Mon Sep 17 00:00:00 2001 From: nickryall Date: Sat, 25 Mar 2017 22:06:51 +1300 Subject: [PATCH] Ensure models remains an observable array after add --- src/Collection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Collection.js b/src/Collection.js index 98fe8e6..0d29703 100644 --- a/src/Collection.js +++ b/src/Collection.js @@ -119,7 +119,7 @@ export default class Collection { */ @action add (data: Array<{ [key: string]: any }>): Array { const models = data.map(d => this.build(d)) - this.models = this.models.concat(models) + this.models.push(...models) return models }