Skip to content

Commit

Permalink
Lock all interactive block stores
Browse files Browse the repository at this point in the history
  • Loading branch information
DAreRodz committed Feb 5, 2024
1 parent 280084e commit 3ed5952
Show file tree
Hide file tree
Showing 5 changed files with 566 additions and 528 deletions.
14 changes: 9 additions & 5 deletions packages/block-library/src/file/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ import { store } from '@wordpress/interactivity';
*/
import { browserSupportsPdfs } from './utils';

store( 'core/file', {
state: {
get hasPdfPreview() {
return browserSupportsPdfs();
store(
'core/file',
{
state: {
get hasPdfPreview() {
return browserSupportsPdfs();
},
},
},
} );
{ lock: true }
);
Loading

0 comments on commit 3ed5952

Please sign in to comment.