mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Fix code editor non-string crash
This commit is contained in:
parent
1ed4b51a01
commit
74804b27c9
@ -581,6 +581,11 @@ class CodeEditor extends React.Component {
|
||||
* @param forcePrettify
|
||||
*/
|
||||
_codemirrorSetValue (code, forcePrettify = false) {
|
||||
if (typeof code !== 'string') {
|
||||
console.warn('Code editor was passed non-string value', code);
|
||||
return;
|
||||
}
|
||||
|
||||
this._originalCode = code;
|
||||
|
||||
// Don't ignore changes from prettify
|
||||
|
Loading…
Reference in New Issue
Block a user