File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export const EFFECT_PRESERVED = 1 << 23; // effects with this flag should not be
2727export const REACTION_IS_UPDATING = 1 << 24 ;
2828export const EFFECT_ASYNC = 1 << 25 ;
2929
30- export const ASYNC_ERROR = 1 ;
30+ export const ERROR_VALUE = 1 << 26 ;
3131
3232export const STATE_SYMBOL = Symbol ( '$state' ) ;
3333export const PROXY_PATH_SYMBOL = Symbol ( 'proxy path' ) ;
Original file line number Diff line number Diff line change 33import { DEV } from 'esm-env' ;
44import { FILENAME } from '../../constants.js' ;
55import { is_firefox } from './dom/operations.js' ;
6- import { ASYNC_ERROR , BOUNDARY_EFFECT , EFFECT_RAN } from './constants.js' ;
6+ import { ERROR_VALUE , BOUNDARY_EFFECT , EFFECT_RAN } from './constants.js' ;
77import { define_property , get_descriptor } from '../shared/utils.js' ;
88import { active_effect , active_reaction } from './runtime.js' ;
99
@@ -15,7 +15,7 @@ export function handle_error(error) {
1515
1616 // for unowned deriveds, don't throw until we read the value
1717 if ( effect === null ) {
18- /** @type {Derived } */ ( active_reaction ) . f |= ASYNC_ERROR ;
18+ /** @type {Derived } */ ( active_reaction ) . f |= ERROR_VALUE ;
1919 return error ;
2020 }
2121
Original file line number Diff line number Diff line change 22/** @import { Batch } from './batch.js'; */
33import { DEV } from 'esm-env' ;
44import {
5- ASYNC_ERROR ,
5+ ERROR_VALUE ,
66 CLEAN ,
77 DERIVED ,
88 DESTROYED ,
@@ -155,14 +155,14 @@ export function async_derived(fn, location) {
155155
156156 if ( error ) {
157157 if ( error !== STALE_REACTION ) {
158- signal . f |= ASYNC_ERROR ;
158+ signal . f |= ERROR_VALUE ;
159159
160160 // @ts -expect-error the error is the wrong type, but we don't care
161161 internal_set ( signal , error ) ;
162162 }
163163 } else {
164- if ( ( signal . f & ASYNC_ERROR ) !== 0 ) {
165- signal . f ^= ASYNC_ERROR ;
164+ if ( ( signal . f & ERROR_VALUE ) !== 0 ) {
165+ signal . f ^= ERROR_VALUE ;
166166 }
167167
168168 internal_set ( signal , value ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import {
2727 EFFECT_ASYNC ,
2828 RENDER_EFFECT ,
2929 STALE_REACTION ,
30- ASYNC_ERROR
30+ ERROR_VALUE
3131} from './constants.js' ;
3232import { flush_tasks } from './dom/task.js' ;
3333import { internal_set , old_values } from './reactivity/sources.js' ;
@@ -369,8 +369,8 @@ export function update_reaction(reaction) {
369369 }
370370 }
371371
372- if ( ( reaction . f & ASYNC_ERROR ) !== 0 ) {
373- reaction . f ^= ASYNC_ERROR ;
372+ if ( ( reaction . f & ERROR_VALUE ) !== 0 ) {
373+ reaction . f ^= ERROR_VALUE ;
374374 }
375375
376376 return result ;
@@ -921,7 +921,7 @@ export function get(signal) {
921921 return batch_deriveds . get ( derived ) ;
922922 }
923923
924- if ( ( signal . f & ASYNC_ERROR ) !== 0 ) {
924+ if ( ( signal . f & ERROR_VALUE ) !== 0 ) {
925925 throw signal . v ;
926926 }
927927
You can’t perform that action at this time.
0 commit comments