Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating scratch note without an open file results an error #141

Closed
jojanaho opened this issue Aug 30, 2020 · 1 comment
Closed

Creating scratch note without an open file results an error #141

jojanaho opened this issue Aug 30, 2020 · 1 comment
Labels
size.small Good for newcomers type.bug Something isn't working

Comments

@jojanaho
Copy link

Describe the bug
Invoking "create scratch note" without any file opened results the following error:
Command 'Dendron: Create Scratch Note' resulted in an error (Cannot read property 'selection' of undefined)

Expected behavior
New scratch note created to root?

@kevinslin
Copy link
Member

kevinslin commented Aug 30, 2020

You're really killing it with the bug finding 😅

Also - good find! This issue is caused by this line

It shouldn't throw an error if the note add behavior === asOwnDomain.

If you feel up to it, would you consider making a pull request? This should be a one line change and I already have integration tests for new note creation (docs to run tests)

If you pull the latest changes from Dendron, I should have fixed all the build errors too so it should just work now.

If you can't, no worries either. I'll probably update it first thing next week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size.small Good for newcomers type.bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants