Skip to content

Commit 1b50c54

Browse files
committed
fix: enhance knowledge base plugin status check to handle empty data response
1 parent 3007f67 commit 1b50c54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dashboard/src/views/alkaid/KnowledgeBase.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,11 +601,11 @@ export default {
601601
checkPlugin() {
602602
axios.get('/api/plugin/get?name=astrbot_plugin_knowledge_base')
603603
.then(response => {
604-
if (response.data.status !== 'ok') {
604+
if (response.data.status !== 'ok' || response.data.data.length === 0) {
605605
this.showSnackbar(this.tm('messages.pluginNotAvailable'), 'error');
606606
return
607607
}
608-
if (!response.data.data.activated) {
608+
if (!response.data.data[0].activated) {
609609
this.showSnackbar(this.tm('messages.pluginNotActivated'), 'error');
610610
return
611611
}

0 commit comments

Comments
 (0)