Skip to content

Commit a404cd8

Browse files
perf: Assistant base embedded
1 parent a64f2db commit a404cd8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

frontend/public/assistant.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; (function () {
1+
;(function () {
22
window.sqlbot_assistant_handler = window.sqlbot_assistant_handler || {}
33
const defaultData = {
44
id: '1',
@@ -461,8 +461,10 @@
461461
let tempData = Object.assign(defaultData, { id, domain_url })
462462
if (config_json) {
463463
const config = JSON.parse(config_json)
464-
Object.assign(tempData, config)
465-
tempData = Object.assign(tempData, config)
464+
if (config) {
465+
delete config.id
466+
tempData = Object.assign(tempData, config)
467+
}
466468
}
467469
tempData['online'] = online && online.toString().toLowerCase() == 'true'
468470
initsqlbot_assistant(tempData)

0 commit comments

Comments
 (0)