sort JavaScript includes to assure script sequence

Who knows what filesystem they're on
This commit is contained in:
DepFA 2022-09-23 03:05:42 +01:00 committed by AUTOMATIC1111
parent 19fc3e8279
commit 42b7902922
1 changed files with 1 additions and 1 deletions

View File

@ -1019,7 +1019,7 @@ with open(os.path.join(script_path, "script.js"), "r", encoding="utf8") as jsfil
javascript = f'<script>{jsfile.read()}</script>'
jsdir = os.path.join(script_path, "javascript")
for filename in os.listdir(jsdir):
for filename in sorted(os.listdir(jsdir)):
with open(os.path.join(jsdir, filename), "r", encoding="utf8") as jsfile:
javascript += f"\n<script>{jsfile.read()}</script>"