event.data.match is not a function

问题遇到的现象和发生背景

前端代码运行加载的时候报:

VM8575:1 Uncaught TypeError: event.data.match is not a function
    at <anonymous>:1:271
(anonymous)    @    VM8575:1
postMessage (async)        
sendMsg    @    sendMessage.js?62fa:10
progressUpdate    @    index.js?10ef:157
eval    @    socket.js?d6e0:57
client.onmessage    @    WebSocketClient.js?5586:50

img

在控制台输出:event.data.match
报:Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'match')
在控制台输出 :data.match
报:user.vue?c1f3:248 Uncaught (in promise) ReferenceError: data is not defined


        async editState(row){
            const confirmResult = await this.$confirm((row.state==1)?'该人员是否离职':'是否复职该人员', '提示',
              {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
                center: true
              }
            ).catch((err) => err)
            // 如果用户确认修改,则返回值为字符串 confirm
            // 如果用户取消了修改,则返回值为字符串 cancel
            // console.log(confirmResult)
            if (confirmResult !== 'confirm') {
              return this.$message.info('已取消')
            }
            const { data: res } = await this.$http.put('user/' + row.state+'/'+row.id)
            if (res.meta.status !== 200) {
              return this.$message.error('修改状态失败!')
            }
            this.$message.success('修改状态成功')
            this.getUserList()
            
        },

271行代码