File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,18 @@ export type ResponseShortcuts = {
1010
1111type ResponseShortcutsPromise = Promise < Response > & ResponseShortcuts
1212
13+ const DECORATED = Symbol ( 'ffetch.responseShortcutsDecorated' )
14+
1315type DecoratedPromise = ResponseShortcutsPromise & {
14- __ffetchResponseShortcutsDecorated__ ?: true
16+ [ DECORATED ] ?: true
1517}
1618
1719function attachResponseShortcuts (
1820 promise : Promise < Response >
1921) : ResponseShortcutsPromise {
2022 const decorated = promise as DecoratedPromise
2123
22- if ( decorated . __ffetchResponseShortcutsDecorated__ ) {
24+ if ( decorated [ DECORATED ] ) {
2325 return decorated
2426 }
2527
@@ -64,7 +66,7 @@ function attachResponseShortcuts(
6466 enumerable : false ,
6567 configurable : false ,
6668 } ,
67- __ffetchResponseShortcutsDecorated__ : {
69+ [ DECORATED ] : {
6870 value : true ,
6971 writable : false ,
7072 enumerable : false ,
You can’t perform that action at this time.
0 commit comments