From 0e18ec022c4a8f31112e9709dbf82c33b306f13d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 3 Oct 2013 15:51:48 -0400 Subject: [PATCH] not running init() if there is no init method in each template script --- public/src/ajaxify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index 12ede65135..7b8cf215fb 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -77,7 +77,7 @@ var ajaxify = {}; templates.load_template(function () { exec_body_scripts(content); require(['forum/' + tpl_url], function(script) { - if (script) script.init(); + if (script && script.init) script.init(); }); if (callback) {