mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #20776 from overleaf/dp-resolve-lint
Provide empty decoration set to useMoreComments when addCommentRanges is undefined GitOrigin-RevId: 40b7ae41ef783586d4304f2896397d8e84628e18
This commit is contained in:
parent
56d396a6cf
commit
4c334b4b45
1 changed files with 2 additions and 1 deletions
|
@ -31,6 +31,7 @@ import { hasActiveRange } from '@/features/review-panel-new/utils/has-active-ran
|
||||||
import { addCommentStateField } from '@/features/source-editor/extensions/add-comment'
|
import { addCommentStateField } from '@/features/source-editor/extensions/add-comment'
|
||||||
import ReviewPanelMoreCommentsButton from './review-panel-more-comments-button'
|
import ReviewPanelMoreCommentsButton from './review-panel-more-comments-button'
|
||||||
import useMoreCommments from '../hooks/use-more-comments'
|
import useMoreCommments from '../hooks/use-more-comments'
|
||||||
|
import { Decoration } from '@codemirror/view'
|
||||||
|
|
||||||
type AggregatedRanges = {
|
type AggregatedRanges = {
|
||||||
changes: Change<EditOperation>[]
|
changes: Change<EditOperation>[]
|
||||||
|
@ -216,7 +217,7 @@ const ReviewPanelCurrentFile: FC = () => {
|
||||||
} = useMoreCommments(
|
} = useMoreCommments(
|
||||||
aggregatedRanges?.changes ?? [],
|
aggregatedRanges?.changes ?? [],
|
||||||
aggregatedRanges?.comments ?? [],
|
aggregatedRanges?.comments ?? [],
|
||||||
addCommentRanges
|
addCommentRanges ?? Decoration.none
|
||||||
)
|
)
|
||||||
|
|
||||||
const updatePositions = useCallback(() => {
|
const updatePositions = useCallback(() => {
|
||||||
|
|
Loading…
Reference in a new issue