File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { is_array } from './internal/shared/utils.js';
66import { user_effect } from './internal/client/index.js' ;
77import * as e from './internal/client/errors.js' ;
88import { lifecycle_outside_component } from './internal/shared/errors.js' ;
9+ import { legacy_mode_flag } from './internal/flags/index.js' ;
910
1011/**
1112 * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
@@ -25,7 +26,7 @@ export function onMount(fn) {
2526 lifecycle_outside_component ( 'onMount' ) ;
2627 }
2728
28- if ( component_context . l !== null ) {
29+ if ( legacy_mode_flag && component_context . l !== null ) {
2930 init_update_callbacks ( component_context ) . m . push ( fn ) ;
3031 } else {
3132 user_effect ( ( ) => {
You can’t perform that action at this time.
0 commit comments