Don't throw exception if data exists for `needsRefreshForInteractivityAPI` (#44808)
This commit is contained in:
parent
e0d8872376
commit
cd5b4196d9
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Fix a possible fatal exception setting a duplicate asset registry key `needsRefreshForInteractivityAPI`
|
|
@ -49,7 +49,7 @@ class ClassicTemplate extends AbstractDynamicBlock {
|
|||
|
||||
// Indicate to interactivity powered components that this block is on the page,
|
||||
// and needs refresh to update data.
|
||||
$this->asset_data_registry->add( 'needsRefreshForInteractivityAPI', true );
|
||||
$this->asset_data_registry->add( 'needsRefreshForInteractivityAPI', true, true );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -180,6 +180,7 @@ class ProductQuery extends AbstractBlock {
|
|||
// and needs refresh to update data.
|
||||
$this->asset_data_registry->add(
|
||||
'needsRefreshForInteractivityAPI',
|
||||
true,
|
||||
true
|
||||
);
|
||||
// Set this so that our product filters can detect if it's a PHP template.
|
||||
|
|
Loading…
Reference in New Issue