-
- Notifications
You must be signed in to change notification settings - Fork 155
Description
The documentation says you can also use an object as a configuration for prop mode. When I use the example ( {name: "javascript", json: true}) it says name.toLowerCase is not a function. Is this a bug regarding this package?
/** string|object. The mode to use. When not given, this will default to the first mode that was loaded.
It may be a string, which either simply names the mode or is a MIME type associated with the mode.
Alternatively, it may be an object containing configuration options for the mode,
with a name property that names the mode (for example {name: "javascript", json: true}). */
mode?: any;
meta.js:213 Uncaught (in promise) TypeError: name.toLowerCase is not a function
at Function.CodeMirror.findModeByName (meta.js:213)
at _callee$ (index.js:79)
at tryCatch (runtime.js:63)
at Generator.invoke [as _invoke] (runtime.js:293)
at Generator.next (runtime.js:118)
at asyncGeneratorStep (asyncToGenerator.js:3)
at _next (asyncToGenerator.js:25)
at asyncToGenerator.js:32
at new Promise ()
at asyncToGenerator.js:21