File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,15 +5,16 @@ import * as debug from './debug'
55import authSession from './authn/authSession'
66import { SolidLogic } from 'solid-logic'
77
8- const fetcher = async ( url , requestInit ) => {
9- if ( authSession . info . webId ) {
8+ async function thisFetch ( url , requestInit ) => {
9+ const omitCreds = requestInit && requestInit . credentials && requestInit . credentials == 'omit'
10+ if ( authSession . info . webId && ! omitCreds ) {
1011 return authSession . fetch ( url , requestInit )
1112 } else {
1213 return window . fetch ( url , requestInit )
1314 }
1415}
1516
16- export const solidLogicSingleton = new SolidLogic ( { fetch : fetcher } , authSession )
17+ export const solidLogicSingleton = new SolidLogic ( { fetch : thisFetch } , authSession )
1718
1819// Make this directly accessible as it is what you need most of the time
1920export const store = solidLogicSingleton . store
You can’t perform that action at this time.
0 commit comments