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

Desktop: Fix Error: Cannot execute a command without a runtime #4343

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

CalebJohn
Copy link
Collaborator

fixes #4338 #4340 #4339

There is some discussion here.

@laurent22 the fix I've introduced here is to keep the focus code as a special case (which it always needed because of commands like textLink) and extended the isEditorCommand function to cover all editor commands that do not start with editor..

I understand if you think this is an ugly solution (although it is an extension of what we were doing previously). And I'm open to having a discussion about what would be a cleaner way to deal with this.

@laurent22 laurent22 changed the base branch from dev to release-1.6 January 11, 2021 22:09
@laurent22 laurent22 changed the base branch from release-1.6 to dev January 11, 2021 22:09
@laurent22
Copy link
Owner

Thanks for the fix @CalebJohn, that fixed the TOC plugin issue and insert template feature. For now let's merge since it works and we can look at doing it differently later if needed. Ideally we'd avoid having the list of commands being duplicated in various places but I don't know how easy it is to change this.

@CalebJohn
Copy link
Collaborator Author

I know I don't like the duplication either, fortunately in the future all commands will conform to editor. so updates will only happen in 1 file. I'll keep this in mind and maybe come back with something better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugins: Uncaught (in promise) Error: Cannot execute a command without a runtime: selectedText
2 participants