From 0f14b25dd3bd4dc11b50f1a15033aeaa4d401362 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Tue, 21 Apr 2015 11:30:54 -0500 Subject: [PATCH] Allow mixins to define initialize(), which will be chained and run before store's initialize. --- lib/create_store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/create_store.js b/lib/create_store.js index b28c177..9dfbea9 100644 --- a/lib/create_store.js +++ b/lib/create_store.js @@ -26,8 +26,8 @@ var createStore = function(spec) { createStore.mixSpecIntoComponent(this, spec); - if (spec.initialize) { - spec.initialize.call(this, options); + if (this.initialize) { + this.initialize(options); } };