Remove redundant checks

The info in wgDiscussionToolsFeaturesEnabled already includes a check
for user options.

Change-Id: I01377e647b1dd5d06b67d1e0c7ee6940f1617066
This commit is contained in:
Bartosz Dziewoński 2021-10-13 21:59:47 +02:00
parent b0c8621973
commit d83816f508
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ function ReplyLinksController( $pageContainer ) {
// "Add topic" link in the skin interface
var featuresEnabled = mw.config.get( 'wgDiscussionToolsFeaturesEnabled' ) || {};
if ( featuresEnabled.newtopictool && mw.user.options.get( 'discussiontools-newtopictool' ) ) {
if ( featuresEnabled.newtopictool ) {
// eslint-disable-next-line no-jquery/no-global-selector
var $addSectionTab = $( '#ca-addsection' );
if ( $addSectionTab.length ) {

View file

@ -444,7 +444,7 @@ function init( $container, state ) {
}
}
if ( featuresEnabled.topicsubscription && mw.user.options.get( 'discussiontools-topicsubscription' ) ) {
if ( featuresEnabled.topicsubscription ) {
initTopicSubscriptions( $container );
}