diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js index 0cd03310..3a6b5310 100644 --- a/modules/jquery.codeEditor.js +++ b/modules/jquery.codeEditor.js @@ -104,7 +104,8 @@ } } ); - context.codeEditorActive = mw.user.options.get( 'usecodeeditor' ) !== '0'; + // Make sure to cast '0' to false + context.codeEditorActive = !!Number( mw.user.options.get( 'usecodeeditor' ) ); /** * Internally used functions