@@ -5,7 +5,6 @@ import { active_reaction, untrack } from './internal/client/runtime.js';
55import { is_array } from './internal/shared/utils.js' ;
66import { user_effect } from './internal/client/index.js' ;
77import * as e from './internal/client/errors.js' ;
8- import { lifecycle_outside_component } from './internal/shared/errors.js' ;
98import { legacy_mode_flag } from './internal/flags/index.js' ;
109import { component_context } from './internal/client/context.js' ;
1110import { DEV } from 'esm-env' ;
@@ -91,7 +90,7 @@ export function getAbortSignal() {
9190 */
9291export function onMount ( fn ) {
9392 if ( component_context === null ) {
94- lifecycle_outside_component ( 'onMount' ) ;
93+ e . lifecycle_outside_component ( 'onMount' ) ;
9594 }
9695
9796 if ( legacy_mode_flag && component_context . l !== null ) {
@@ -115,7 +114,7 @@ export function onMount(fn) {
115114 */
116115export function onDestroy ( fn ) {
117116 if ( component_context === null ) {
118- lifecycle_outside_component ( 'onDestroy' ) ;
117+ e . lifecycle_outside_component ( 'onDestroy' ) ;
119118 }
120119
121120 onMount ( ( ) => ( ) => untrack ( fn ) ) ;
@@ -158,7 +157,7 @@ function create_custom_event(type, detail, { bubbles = false, cancelable = false
158157export function createEventDispatcher ( ) {
159158 const active_component_context = component_context ;
160159 if ( active_component_context === null ) {
161- lifecycle_outside_component ( 'createEventDispatcher' ) ;
160+ e . lifecycle_outside_component ( 'createEventDispatcher' ) ;
162161 }
163162
164163 return ( type , detail , options ) => {
@@ -196,7 +195,7 @@ export function createEventDispatcher() {
196195 */
197196export function beforeUpdate ( fn ) {
198197 if ( component_context === null ) {
199- lifecycle_outside_component ( 'beforeUpdate' ) ;
198+ e . lifecycle_outside_component ( 'beforeUpdate' ) ;
200199 }
201200
202201 if ( component_context . l === null ) {
@@ -219,7 +218,7 @@ export function beforeUpdate(fn) {
219218 */
220219export function afterUpdate ( fn ) {
221220 if ( component_context === null ) {
222- lifecycle_outside_component ( 'afterUpdate' ) ;
221+ e . lifecycle_outside_component ( 'afterUpdate' ) ;
223222 }
224223
225224 if ( component_context . l === null ) {
0 commit comments