Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Quentin Valmori <[email protected]>
  • Loading branch information
edas and Crash-- authored Jan 9, 2020
1 parent 91b0ef8 commit 855442a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useNote.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ function useNote({ serviceClient, noteId }) {
setDocId(noteId)
} else if (serviceClient) {
// load the note if needed
if (!doc || doc.file.id != docId) loadNote()
if (!doc || doc.file.id !== docId) loadNote()
}
},
[noteId, docId, setDocId, setLoading, serviceClient, setDoc, setTitle]
)

if (docId == noteId) return { loading, title, doc, setTitle }
if (docId === noteId) return { loading, title, doc, setTitle }
else return { loading: true, title: undefined, doc: undefined, setTitle }
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/collab/channel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jest.mock('prosemirror-collab', () => {
return { getVersion: jest.fn(), sendableSteps: jest.fn() }
})

const noteId = 'myDocId'
const noteId = 'myNoteId'
const config = { noteId }
const service = {
pushSteps: jest.fn(),
Expand Down

0 comments on commit 855442a

Please sign in to comment.