perf: Make frontend linting faster (no-changelog) (#7717)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -102,7 +102,7 @@ export async function makeRestApiRequest<T>(
|
||||
context: IRestApiContext,
|
||||
method: Method,
|
||||
endpoint: string,
|
||||
data?: any,
|
||||
data?: IDataObject,
|
||||
) {
|
||||
const response = await request({
|
||||
method,
|
||||
|
||||
@@ -203,10 +203,11 @@ function getValue<T extends object>(obj: T, prop: string): unknown {
|
||||
|
||||
const segments = prop.split('.');
|
||||
|
||||
let result: any = obj;
|
||||
let result = obj;
|
||||
let i = 0;
|
||||
while (result && i < segments.length) {
|
||||
result = result[segments[i]];
|
||||
const key = segments[i] as keyof T;
|
||||
result = result[key] as T;
|
||||
i++;
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user