Daniel@0: // By default TemplateCache fails to load templates that have zero length Daniel@0: // Daniel@0: Backbone.Marionette.TemplateCache.prototype.loadTemplate = function(templateId) { Daniel@0: var $template = Backbone.$(templateId); Daniel@0: if (!$template.length) { Daniel@0: throw new Marionette.Error({ Daniel@0: name : 'NoTemplateError', Daniel@0: message : 'Could not find template: "' + templateId + '"' Daniel@0: }); Daniel@0: } Daniel@0: return $template.html(); Daniel@0: };