Skip to content

Commit a95a762

Browse files
authored
Using ternary shorthand, upgrade preview 2.1.0-2 (#337)
1 parent ad4399b commit a95a762

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/microsoft-graph-client",
3-
"version": "2.1.0-Preview.1",
3+
"version": "2.1.0-Preview.2",
44
"description": "Microsoft Graph Client Library",
55
"license": "MIT",
66
"main": "lib/src/index.js",

src/GraphRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ export class GraphRequest {
651651
method: RequestMethod.POST,
652652
body: serializeContent(content),
653653
};
654-
const className: string = content === undefined || content === null ? undefined : content.constructor.name;
654+
const className: string = content && content.constructor && content.constructor.name;
655655
if (className === "FormData") {
656656
// Content-Type headers should not be specified in case the of FormData type content
657657
options.headers = {};

src/GraphRequestUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const urlJoin = (urlSegments: string[]): string => {
4141
*/
4242

4343
export const serializeContent = (content: any): any => {
44-
const className: string = content === undefined || content === null ? undefined : content.constructor.name;
44+
const className: string = content && content.constructor && content.constructor.name;
4545
if (className === "Buffer" || className === "Blob" || className === "File" || className === "FormData" || typeof content === "string") {
4646
return content;
4747
}

src/Version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
* @module Version
1313
*/
1414

15-
export const PACKAGE_VERSION = "2.1.0-Preview.1";
15+
export const PACKAGE_VERSION = "2.1.0-Preview.2";

0 commit comments

Comments
 (0)