app/assets/javascripts/utils/content/editor/item.js in katalyst-content-0.2.2 vs app/assets/javascripts/utils/content/editor/item.js in katalyst-content-1.0.0
- old
+ new
@@ -40,10 +40,10 @@
/**
* @returns {number} logical nesting depth of node in container
*/
get depth() {
- return parseInt(this.node.dataset[`contentDepth`]);
+ return parseInt(this.node.dataset[`contentDepth`]) || 0;
}
get #depthInput() {
return this.node.querySelector(`input[name$="[depth]"]`);
}