Skip to content

Unable to edit package.json via WebIDE

Summary

When opening a "package.json" via WebIDE the Editor doesn't display and it produces a Javascript error:

TypeError: e.indexOf is not a function
    at Object.yo [as createModel] (standaloneEditor.js:104)
    at new e (model.js:13)
    at e.value (model_manager.js:24)
    at e.value (editor.js:91)
    at a.setupEditor (repo_editor.vue:156)
    at a.<anonymous> (repo_editor.vue:148)
    at Array.<anonymous> (vue.esm.js:1837)
    at Qe (vue.esm.js:1758)

Steps to reproduce

(Tested with Chrome and Edge)

  1. Create empty project (or just use an existing one).
  2. Create a sample package.json (I used the one from here https://github.com/heroku/node-js-sample/blob/master/package.json )
  3. Open WebIDE and open that package.json inside it

Example Project

https://gitlab.com/Wolfspirit/TestIssue

What is the current bug behavior?

White page where the editor should be.

What is the expected correct behavior?

Editor appears and allows editing.

Relevant logs and/or screenshots

TypeError: e.indexOf is not a function
    at Object.yo [as createModel] (standaloneEditor.js:104)
    at new e (model.js:13)
    at e.value (model_manager.js:24)
    at e.value (editor.js:91)
    at a.setupEditor (repo_editor.vue:156)
    at a.<anonymous> (repo_editor.vue:148)
    at Array.<anonymous> (vue.esm.js:1837)
    at Qe (vue.esm.js:1758)

image

Output of checks

This bug happens on GitLab.com

Edited by Wolfspirit