File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2565,10 +2565,12 @@ export class Element implements NodeCast {
25652565 /** Set a dataset on the element */
25662566 setDataset ( name : string , value : unknown ) {
25672567 this . dataset [ name ] = value
2568- if ( BM . SHADOW || ( BM . DYNAMIC && this . getBackendMode ( ) === BackendMode . Shadow ) ) {
2569- if ( ENV . DEV ) performanceMeasureStart ( 'backend.setDataset' )
2570- ; ( this . _$backendElement as backend . Element ) . setDataset ( name , value )
2571- if ( ENV . DEV ) performanceMeasureEnd ( )
2568+ if ( this . _$backendElement ) {
2569+ if ( BM . SHADOW || ( BM . DYNAMIC && this . getBackendMode ( ) === BackendMode . Shadow ) ) {
2570+ if ( ENV . DEV ) performanceMeasureStart ( 'backend.setDataset' )
2571+ ; ( this . _$backendElement as backend . Element ) . setDataset ( name , value )
2572+ if ( ENV . DEV ) performanceMeasureEnd ( )
2573+ }
25722574 }
25732575 if ( this . _$mutationObserverTarget ) {
25742576 MutationObserverTarget . callAttrObservers ( this , {
You can’t perform that action at this time.
0 commit comments