Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js |
— | — | @@ -21,6 +21,11 @@ |
22 | 22 | */ |
23 | 23 | evt: { |
24 | 24 | ready: function( context, event ) { |
| 25 | + // Only run this code if this module is turned on |
| 26 | + if ( !( '$toc' in context.modules ) ) { |
| 27 | + return; |
| 28 | + } |
| 29 | + |
25 | 30 | // Add the TOC to the document |
26 | 31 | $.wikiEditor.modules.toc.fn.build( context ); |
27 | 32 | context.$content.parent() |