Mercurial > hg > dml-open-vis
view src/DML/VendorAssetsBundle/Resources/assets/backbone.marionette/dev/TemplateCache.loadTemplate_fixed.js @ 1:f38015048f48 tip
Added GPL
author | Daniel Wolff |
---|---|
date | Sat, 13 Feb 2016 20:43:38 +0100 |
parents | 493bcb69166c |
children |
line wrap: on
line source
// By default TemplateCache fails to load templates that have zero length // Backbone.Marionette.TemplateCache.prototype.loadTemplate = function(templateId) { var $template = Backbone.$(templateId); if (!$template.length) { throw new Marionette.Error({ name : 'NoTemplateError', message : 'Could not find template: "' + templateId + '"' }); } return $template.html(); };