fix: param maybe null

This commit is contained in:
linonetwo 2023-09-16 04:49:50 +08:00
parent 3d8ade3ebe
commit 6b6124369c
1 changed files with 2 additions and 3 deletions

View File

@ -34,10 +34,9 @@ BlockIdWidget.prototype.render = function(parent,nextSibling) {
}; };
BlockIdWidget.prototype.hookFocusElementEvent = function(event) { BlockIdWidget.prototype.hookFocusElementEvent = function(event) {
if(!event.param) return event;
var id = event.param.replace('#',''); var id = event.param.replace('#','');
if(id !== this.id) { if(id !== this.id) return event;
return event;
}
var element = this.parentDomNode; var element = this.parentDomNode;
// need to check if the block is before this node // need to check if the block is before this node
if(this.previousSibling) { if(this.previousSibling) {