mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
template names are now case in-sensitive.
This commit is contained in:
parent
754f9c5134
commit
51038d656c
4 changed files with 11 additions and 8 deletions
|
@ -1,22 +1,23 @@
|
|||
"use strict";
|
||||
|
||||
Marionette.TemplateCache.get = function (templateId) {
|
||||
var templateFunction = window.Templates[templateId];
|
||||
|
||||
var templateKey = templateId.toLowerCase();
|
||||
|
||||
var templateFunction = window.Templates[templateKey.toLowerCase()];
|
||||
|
||||
if (!templateFunction) {
|
||||
console.error('couldn\'t find pre-compiled template ' + templateId);
|
||||
throw 'couldn\'t find pre-compiled template ' + templateKey;
|
||||
}
|
||||
|
||||
var templateName = templateId;
|
||||
|
||||
return function (data) {
|
||||
|
||||
try {
|
||||
//console.log('rendering template ' + templateName);
|
||||
//console.log('rendering template ' + templateKey);
|
||||
return templateFunction(data);
|
||||
}
|
||||
catch (error) {
|
||||
console.error('template render failed for ' + templateName + ' ' + error.message);
|
||||
console.error('template render failed for ' + templateKey + ' ' + error.message);
|
||||
console.error(data);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue