Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function () {

Check notice on line 1 in src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.component.js

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v13/dev)

ℹ Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 5.00 to 5.03, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
"use strict";

/**
Expand Down Expand Up @@ -256,7 +256,7 @@
toolbar: editorConfig.toolbar,
model: vm.model,
getValue: function () {
return vm.model.value.markup;
return vm.model.value.markup ?? "";
},
setValue: function (newVal) {
vm.model.value.markup = newVal;
Expand Down Expand Up @@ -348,7 +348,9 @@
// But I'm not sure it's needed, as this does not trigger the RTE
if(modelObject) {
modelObject.update(vm.model.value.blocks, $scope);
vm.tinyMceEditor.fire('updateBlocks');
if (vm.tinyMceEditor) {
vm.tinyMceEditor.fire('updateBlocks');
}
onLoaded();
}
}
Expand Down
Loading