Skip to content

Commit 15c5ee0

Browse files
authored
Merge pull request #882 from lstoyanoff/fix/wp-editor-context-check
fix: assets context loading
2 parents e690755 + 7ece00f commit 15c5ee0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/Loader/Loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function enqueue_media_browser() {
140140
* @return string
141141
*/
142142
protected function get_assets_context() {
143-
return wp_script_is( 'wp-element' ) ? 'gutenberg' : 'classic';
143+
return get_current_screen()->is_block_editor() ? 'gutenberg' : 'classic';
144144
}
145145

146146
/**

0 commit comments

Comments
 (0)