Skip to content

Commit

Permalink
sort JavaScript includes to assure script sequence
Browse files Browse the repository at this point in the history
Who knows what filesystem they're on
  • Loading branch information
dfaker authored and AUTOMATIC1111 committed Sep 23, 2022
1 parent 19fc3e8 commit 42b7902
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ def apply_field(obj, field, condition=None):
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>"

Expand Down

0 comments on commit 42b7902

Please sign in to comment.