Skip to content

Commit

Permalink
Set category when requiring dev modules (#3341)
Browse files Browse the repository at this point in the history
Co-authored-by: hjpalpha <[email protected]>
  • Loading branch information
iMarbot and hjpalpha authored Oct 2, 2023
1 parent 094d8d0 commit 56c9cd9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion standard/lua.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ function Lua.import(name, options)
end

local devName = name .. '/dev'
if require('Module:FeatureFlag').get('dev') and Lua.moduleExists(devName) then
local devEnabled = require('Module:FeatureFlag').get('dev')
if devEnabled and require('Module:Namespace').isMain() then
mw.ext.TeamLiquidIntegration.add_category('Pages using dev modules')
end
if devEnabled and Lua.moduleExists(devName) then
return require(devName)
else
return require(name)
Expand Down

0 comments on commit 56c9cd9

Please sign in to comment.