From c69569dab40f35f61495adab0a013c8227036669 Mon Sep 17 00:00:00 2001 From: Stefan Lau Date: Sun, 9 Mar 2014 20:47:40 +0100 Subject: [PATCH] use viewId if passed in config --- lib/Module.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Module.js b/lib/Module.js index 1da9fc3..037ada7 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -13,7 +13,12 @@ Module = Backbone.Model.extend({ this.attributes = {}; this.id = config.id; this.config = _.extend({}, this.defaults, _.omit(config, 'id')); - this.title = this.config.title; + if (this.config.title) { + this.title = this.config.title; + } + if (this.config.viewId) { + this.viewId = this.config.viewId; + } this.initialize(); } });