Skip to content
Snippets Groups Projects
Commit 5f8d1888 authored by Chris Hallberg's avatar Chris Hallberg Committed by Demian Katz
Browse files

Make init method in VuFind JS plugins optional.

parent f79ab96a
No related merge requests found
......@@ -16,13 +16,15 @@ var VuFind = (function() {
this[name] = typeof module == 'function' ? module() : module;
}
// If the object has already initialized, we should auto-init on register:
if (_initialized) {
if (_initialized && this[name].init) {
this[name].init();
}
};
var init = function() {
for (var i=0; i<_submodules.length; i++) {
this[_submodules[i]].init();
if (this[_submodules[i]].init) {
this[_submodules[i]].init();
}
}
_initialized = true;
};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment