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

'Commands' does no longer work - 'TypeError: undefined is not an object' #1326

Closed
binste opened this issue Apr 30, 2023 · 4 comments
Closed
Labels

Comments

@binste
Copy link

binste commented Apr 30, 2023

The 'Commands' button no longer works for me:

Screen.Recording.2023-04-30.at.17.43.44.mov

This is the error in Safari 16.4:

[Error] TypeError: undefined is not an object (evaluating 'this.props.editorRef.focus')

	Ei (vendor.js:29:411519)
	(anonymous function) (vendor.js:29:417103)
	Oe (vendor.js:29:492378)
	(anonymous function) (vendor.js:29:412936)
	Pi (vendor.js:29:412964)
	Qt (vendor.js:29:401035)
	Xt (vendor.js:29:400261)
	Xt
	(anonymous function) (vendor.js:29:706494)
	Me (vendor.js:29:492119)
	Gt (vendor.js:29:400054)
	Gt

Error in Chrome 112.0.5615.137:

caught TypeError: Cannot read properties of undefined (reading 'focus')
    at k.openCommandPalette (renderer.tsx:127:30)
    at Object.je (react-dom.production.min.js:52:317)
    at Ke (react-dom.production.min.js:52:471)
    at react-dom.production.min.js:53:35
    at ki (react-dom.production.min.js:100:68)
    at Ei (react-dom.production.min.js:101:380)
    at react-dom.production.min.js:113:65
    at Oe (react-dom.production.min.js:292:189)
    at react-dom.production.min.js:50:57
    at Pi (react-dom.production.min.js:105:469)
@domoritz
Copy link
Member

domoritz commented May 1, 2023

I can confirm this issue. Can you help fix it?

@domoritz domoritz added the bug label May 1, 2023
@binste
Copy link
Author

binste commented May 1, 2023

I was able to track down the commit which introduced the bug: Prior to eb17acc, it worked, with the commit, I get the error. In this commit, monaco-editor is upgraded from 0.34.0 to 0.34.1 and react-monaco-editor from 0.50.1 to 0.51.0. Unfortunately, my javascript skills are very limited and so I'm not sure how to debug this further but maybe it's a start for someone else.

@domoritz
Copy link
Member

domoritz commented May 1, 2023

That's very helpful. Thanks for identifying the change that broke this.

@binste
Copy link
Author

binste commented May 5, 2023

Can confirm that it works, thank you very much for the quick fix!

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

No branches or pull requests

2 participants