potential fix for templates bug

v1.18.x
psychobunny 12 years ago
parent 6cd65e6598
commit 17cde19020

@ -2,8 +2,7 @@
(function (module) {
var ready_callback,
config = {},
var config = {},
templates,
fs = null,
available_templates = [];
@ -35,8 +34,19 @@
};
templates.ready = function(callback) {
if (callback == null && ready_callback) ready_callback();
else ready_callback = callback;
if (callback == null) {
if (this.ready_callback) {
this.ready_callback();
} else {
this.loaded = true;
}
} else {
if (this.loaded == true) {
callback();
} else {
this.ready_callback = callback;
}
}
};
templates.prepare = function(raw_tpl, data) {

Loading…
Cancel
Save