Skip to content

Commit

Permalink
store
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyhhssyy committed Jun 22, 2024
1 parent 348cead commit 0585908
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/stores/gamehub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ export const useGameHubStore = defineStore('gameHub', () => {
}
//console.log('注册事件:' + eventName)

const existingJsonCallback = callbacks.find((x) => x.originalCallback == callback)

if(existingJsonCallback){
return
}

const jsonParseCallback = (response: any) => {
const responseObj = JSON.parse(response)
if(eventName !== 'GameInfo'){
Expand Down

0 comments on commit 0585908

Please sign in to comment.