mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-04 19:37:51 +01:00
Catch some edge cases when importing
This commit is contained in:
parent
643e0105d8
commit
0e855ef1d8
@ -1216,6 +1216,9 @@ def importRequest():
|
||||
file = open(importpath, "rb")
|
||||
vars.importjs = json.load(file)
|
||||
|
||||
if type(vars.importjs) is dict and "stories" in vars.importjs:
|
||||
vars.importjs = vars.importjs["stories"]
|
||||
|
||||
# Clear Popup Contents
|
||||
emit('from_server', {'cmd': 'clearpopup', 'data': ''})
|
||||
|
||||
@ -1269,7 +1272,7 @@ def importgame():
|
||||
else:
|
||||
vars.prompt = ""
|
||||
vars.memory = ref["memory"]
|
||||
vars.authornote = ref["authorsNote"]
|
||||
vars.authornote = ref["authorsNote"] if type(ref["authorsNote"]) is str else ""
|
||||
vars.actions = []
|
||||
vars.worldinfo = []
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user