Skip to content

Commit

Permalink
Using ternary shorthand, upgrade preview 2.1.0-2 (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikithauc authored Oct 6, 2020
1 parent ad4399b commit a95a762
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/microsoft-graph-client",
"version": "2.1.0-Preview.1",
"version": "2.1.0-Preview.2",
"description": "Microsoft Graph Client Library",
"license": "MIT",
"main": "lib/src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/GraphRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ export class GraphRequest {
method: RequestMethod.POST,
body: serializeContent(content),
};
const className: string = content === undefined || content === null ? undefined : content.constructor.name;
const className: string = content && content.constructor && content.constructor.name;
if (className === "FormData") {
// Content-Type headers should not be specified in case the of FormData type content
options.headers = {};
Expand Down
2 changes: 1 addition & 1 deletion src/GraphRequestUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const urlJoin = (urlSegments: string[]): string => {
*/

export const serializeContent = (content: any): any => {
const className: string = content === undefined || content === null ? undefined : content.constructor.name;
const className: string = content && content.constructor && content.constructor.name;
if (className === "Buffer" || className === "Blob" || className === "File" || className === "FormData" || typeof content === "string") {
return content;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
* @module Version
*/

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

0 comments on commit a95a762

Please sign in to comment.