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.
|
||||
*/
|
||||
public static getInstance(url: string): GraphQLGetClient {
|
||||
GraphQLGetClient.instanceArray.forEach(function (instance) {
|
||||
if (instance.url === url) {
|
||||
const instance = GraphQLGetClient.instanceArray.find((instance) => instance.url === url)
|
||||
if (instance) {
|
||||
return instance.client
|
||||
}
|
||||
})
|
||||
const client = new GraphQLGetClient(url, {
|
||||
method: 'GET',
|
||||
jsonSerializer: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user