1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

Replaced underscore.js & is.js with lodash.js

This commit is contained in:
Harvey Kandola 2019-03-03 13:10:04 +00:00
parent df8e843bf5
commit 566807bc14
93 changed files with 17379 additions and 2056 deletions

View file

@ -62,7 +62,7 @@ export default Component.extend({
this.set('syntaxOptions', opts);
// default check
if (is.null(this.get("codeSyntax"))) {
if (_.isNull(this.get("codeSyntax"))) {
this.set("codeSyntax", opts.findBy("mode", "htmlmixed"));
}
},
@ -83,7 +83,7 @@ export default Component.extend({
};
let syntax = this.get("codeSyntax");
if (is.not.undefined(syntax)) {
if (!_.isUndefined(syntax)) {
CodeMirror.autoLoadMode(editor, syntax.mode);
editor.setOption("mode", syntax.mode);
}
@ -94,7 +94,7 @@ export default Component.extend({
willDestroyElement() {
let editor = this.get('codeEditor');
if (is.not.null(editor)) {
if (!_.isNull(editor)) {
editor.toTextArea();
editor = null;
this.set('codeEditor', null);

View file

@ -63,7 +63,7 @@ export default Component.extend({
});
let syntax = this.get("codeSyntax");
if (is.not.undefined(syntax)) {
if (!_.isUndefined(syntax)) {
CodeMirror.autoLoadMode(editor, syntax.mode);
editor.setOption("mode", syntax.mode);
}
@ -75,7 +75,7 @@ export default Component.extend({
this._super(...arguments);
let editor = this.get('codeEditor');
if (is.not.null(editor)) {
if (!_.isNull(editor)) {
editor.toTextArea();
editor = null;
}