Update MMDService.ts
Simplified the `GetTermsAsDropdownOptions` method
This commit is contained in:
parent
14eb43106d
commit
352182bfa0
|
@ -16,17 +16,11 @@ export class MMDService {
|
||||||
if (requiredOptionsFromCache.length) {
|
if (requiredOptionsFromCache.length) {
|
||||||
options = requiredOptionsFromCache.map(r => ({ key: r.key, text: r.text }));
|
options = requiredOptionsFromCache.map(r => ({ key: r.key, text: r.text }));
|
||||||
return options;
|
return options;
|
||||||
} else {
|
}
|
||||||
//Get from Graph
|
}
|
||||||
return await this._getTermsAsDropdownOptionsUsingGraph(apiUrl, parent);
|
}
|
||||||
}
|
//Get data using Graph
|
||||||
} else {
|
return await this._getTermsAsDropdownOptionsUsingGraph(apiUrl, parent);
|
||||||
//Get from Graph
|
|
||||||
return await this._getTermsAsDropdownOptionsUsingGraph(apiUrl, parent);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return await this._getTermsAsDropdownOptionsUsingGraph(apiUrl, parent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async _getTermsAsDropdownOptionsUsingGraph(apiUrl: string, parent: string): Promise<IDropdownOption[]> {
|
private static async _getTermsAsDropdownOptionsUsingGraph(apiUrl: string, parent: string): Promise<IDropdownOption[]> {
|
||||||
|
@ -68,4 +62,4 @@ export class MMDService {
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue