mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-14 08:25:09 -05:00
js: Fix load_plugin_modules use from build commands.
This commit is contained in:
committed by
Max Goodman
parent
86f920fa32
commit
b832496391
@@ -28,6 +28,7 @@ import re
|
||||
import json
|
||||
|
||||
from r2.lib.translation import iter_langs
|
||||
from r2.lib.plugin import PluginLoader
|
||||
|
||||
try:
|
||||
from pylons import g, c, config
|
||||
@@ -326,7 +327,9 @@ module["qrcode"] = Module("qrcode.js",
|
||||
def use(*names):
|
||||
return "\n".join(module[name].use() for name in names)
|
||||
|
||||
def load_plugin_modules(plugins):
|
||||
def load_plugin_modules(plugins=None):
|
||||
if not plugins:
|
||||
plugins = PluginLoader()
|
||||
for plugin in plugins:
|
||||
plugin.add_js(module)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user