Merge "Fix broken file level comment"
This commit is contained in:
@@ -561,7 +561,13 @@ export class GrDiff extends GestureEventListeners(
|
|||||||
);
|
);
|
||||||
return;
|
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() {
|
createRangeComment() {
|
||||||
@@ -644,7 +650,7 @@ export class GrDiff extends GestureEventListeners(
|
|||||||
|
|
||||||
_createComment(
|
_createComment(
|
||||||
lineEl: Element,
|
lineEl: Element,
|
||||||
lineNum: LineNumber,
|
lineNum?: LineNumber,
|
||||||
side?: Side,
|
side?: Side,
|
||||||
range?: CommentRange
|
range?: CommentRange
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user