|
1 | 1 | import { AffectedTaskOccurrence } from "../../../Enumerations/AffectedTaskOccurrence"; |
2 | 2 | import { ArchiveTag } from "../../../ComplexProperties/ArchiveTag"; |
3 | | -import { ArrayHelper, StringHelper } from "../../../ExtensionMethods"; |
| 3 | +import { ArrayHelper, StringHelper, isNullOrUndefined } from "../../../ExtensionMethods"; |
4 | 4 | import { Attachment } from "../../../ComplexProperties/Attachment"; |
5 | 5 | import { AttachmentCollection } from "../../../ComplexProperties/AttachmentCollection"; |
6 | 6 | import { ConflictResolutionMode } from "../../../Enumerations/ConflictResolutionMode"; |
@@ -670,7 +670,9 @@ export class Item extends ServiceObject { |
670 | 670 | * @param {boolean} suppressReadReceipts Whether to suppress read receipts |
671 | 671 | */ |
672 | 672 | Delete(deleteMode: DeleteMode, suppressReadReceipts: boolean): Promise<void> |
673 | | - Delete(deleteMode: DeleteMode, suppressReadReceipts: boolean = false): Promise<void> { return this.InternalDelete(deleteMode, null, null, suppressReadReceipts); } |
| 673 | + Delete(deleteMode: DeleteMode, suppressReadReceipts: boolean = false): Promise<void> { |
| 674 | + return this.InternalDelete(deleteMode, null, null, suppressReadReceipts); |
| 675 | + } |
674 | 676 |
|
675 | 677 | /** |
676 | 678 | * @internal Gets a list of extended properties defined on this object. |
@@ -785,16 +787,14 @@ export class Item extends ServiceObject { |
785 | 787 | this.ThrowIfThisIsAttachment(); |
786 | 788 |
|
787 | 789 | // If sendCancellationsMode is null, use the default value that's appropriate for item type. |
788 | | - // if (!sendCancellationsMode) |
789 | | - // { |
790 | | - // sendCancellationsMode = this.DefaultSendCancellationsMode; |
791 | | - // } |
| 790 | + if (isNullOrUndefined(sendCancellationsMode)) { |
| 791 | + sendCancellationsMode = this.DefaultSendCancellationsMode; |
| 792 | + } |
792 | 793 |
|
793 | 794 | // If affectedTaskOccurrences is null, use the default value that's appropriate for item type. |
794 | | - // if (!affectedTaskOccurrences) |
795 | | - // { |
796 | | - // affectedTaskOccurrences = this.DefaultAffectedTaskOccurrences; |
797 | | - // } |
| 795 | + if (isNullOrUndefined(affectedTaskOccurrences)) { |
| 796 | + affectedTaskOccurrences = this.DefaultAffectedTaskOccurrences; |
| 797 | + } |
798 | 798 |
|
799 | 799 | return this.Service.DeleteItem( |
800 | 800 | this.Id, |
|
0 commit comments