From 6b6124369cab6249b8be15bb5bb33fec3ad51cd6 Mon Sep 17 00:00:00 2001 From: linonetwo Date: Sat, 16 Sep 2023 04:49:50 +0800 Subject: [PATCH] fix: param maybe null --- core/modules/widgets/blockid.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/modules/widgets/blockid.js b/core/modules/widgets/blockid.js index 0d915ab7a..959b53243 100644 --- a/core/modules/widgets/blockid.js +++ b/core/modules/widgets/blockid.js @@ -34,10 +34,9 @@ BlockIdWidget.prototype.render = function(parent,nextSibling) { }; BlockIdWidget.prototype.hookFocusElementEvent = function(event) { + if(!event.param) return event; var id = event.param.replace('#',''); - if(id !== this.id) { - return event; - } + if(id !== this.id) return event; var element = this.parentDomNode; // need to check if the block is before this node if(this.previousSibling) {