Merge "Fix broken file level comment"
This commit is contained in:
@@ -561,7 +561,13 @@ export class GrDiff extends GestureEventListeners(
|
||||
);
|
||||
return;
|
||||
}
|
||||
this._createComment(el, lineNum);
|
||||
|
||||
// TODO(TS): existing logic always pass undefined lineNum
|
||||
// for file level comment, the drafts API will reject the
|
||||
// request if file level draft contains the `line: 'FILE'` field
|
||||
// probably should do this inside of the _createComment, this
|
||||
// is just to keep existing behavior.
|
||||
this._createComment(el, lineNum === FILE ? undefined : lineNum);
|
||||
}
|
||||
|
||||
createRangeComment() {
|
||||
@@ -644,7 +650,7 @@ export class GrDiff extends GestureEventListeners(
|
||||
|
||||
_createComment(
|
||||
lineEl: Element,
|
||||
lineNum: LineNumber,
|
||||
lineNum?: LineNumber,
|
||||
side?: Side,
|
||||
range?: CommentRange
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user