Skip to content

Commit b946955

Browse files
nikithauczengin
andauthored
Altering condition to be optimal
Co-authored-by: Mustafa Zengin <[email protected]>
1 parent 6813139 commit b946955

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GraphRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ export class GraphRequest {
512512
}
513513
if (oDataQueryNames.indexOf(paramKey) !== -1) {
514514
const currentValue = this.urlComponents.oDataQueryParams[paramKey];
515-
const isValueAppendable = (paramKey === "$expand" || paramKey === "$select" || paramKey === "$orderby") && currentValue;
515+
const isValueAppendable = currentValue && (paramKey === "$expand" || paramKey === "$select" || paramKey === "$orderby");
516516
this.urlComponents.oDataQueryParams[paramKey] = isValueAppendable ? currentValue + "," + paramValue : paramValue;
517517
} else {
518518
this.urlComponents.otherURLQueryParams[paramKey] = paramValue;

0 commit comments

Comments
 (0)