mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix foreach singleton problem
This commit is contained in:
parent
fc6d64af59
commit
3af7239d5e
@ -26,11 +26,10 @@ export class GraphQLGetClient extends GraphQLClient {
|
|||||||
* just one instance of each subclass around.
|
* just one instance of each subclass around.
|
||||||
*/
|
*/
|
||||||
public static getInstance(url: string): GraphQLGetClient {
|
public static getInstance(url: string): GraphQLGetClient {
|
||||||
GraphQLGetClient.instanceArray.forEach(function (instance) {
|
const instance = GraphQLGetClient.instanceArray.find((instance) => instance.url === url)
|
||||||
if (instance.url === url) {
|
if (instance) {
|
||||||
return instance.client
|
return instance.client
|
||||||
}
|
}
|
||||||
})
|
|
||||||
const client = new GraphQLGetClient(url, {
|
const client = new GraphQLGetClient(url, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
jsonSerializer: {
|
jsonSerializer: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user