File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ export default {
18
18
const zoom = this . em . getZoomDecimal ( ) ;
19
19
const el = opt . el as HTMLElement | undefined ;
20
20
21
+ if ( ! ( el instanceof HTMLElement ) ) {
22
+ return ;
23
+ }
24
+
21
25
if ( ! config . showOffsets || ! el || isTextNode ( el ) || ( ! config . showOffsetsSelected && state == 'Fixed' ) ) {
22
26
editor . stopCommand ( `${ this . id } ` , opts ) ;
23
27
return ;
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ export default class Selector extends Model<SelectorProps & { [key: string]: unk
191
191
* @private
192
192
*/
193
193
static escapeName ( name : string ) {
194
- return `${ name } ` . trim ( ) . replace ( / ( [ ^ a - z 0 - 9 \w -\\ : @ \\ / ] + ) / gi, '-' ) ;
194
+ return `${ name } ` . trim ( ) . replace ( / ( [ ^ a - z 0 - 9 \w \ -\\ : @ \\ / ( ) \. % \+ \[ \] ] + ) / gi, '-' ) ;
195
195
}
196
196
}
197
197
You can’t perform that action at this time.
0 commit comments