[FIX] web_editor: regression less editor 5af122387
In 5af12238 a change was made to have the correct hierarchy levels, but
this can cause an issue when editing less files.
This is because we now had "undefined + 1" which gives NaN which breaks
Array constructor.
opw-814579
opw-815397
opw-814322
opw-815265
opw-814021
closes #23006
This commit is contained in:
@@ -742,7 +742,7 @@ var ViewEditor = Widget.extend({
|
||||
|
||||
var text = data.text || '';
|
||||
if (!isSelected) {
|
||||
text = Array($elem.data('level') + 1).join('-') + ' ' + text;
|
||||
text = Array(($elem.data('level') || 0) + 1).join('-') + ' ' + text;
|
||||
}
|
||||
var $div = $('<div/>', {
|
||||
text: text,
|
||||
|
||||
Reference in New Issue
Block a user