MDL-50801 atto_table: Caption node might not be present
Users may not use atto table (which always adds a caption) to set HTML tables, this patch addresses that case.
This commit is contained in:
Vendored
+1
-1
@@ -929,7 +929,7 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
captioninput.set('value', '');
|
||||
}
|
||||
|
||||
if (captionpositioninput && captionnode.getAttribute('style')) {
|
||||
if (captionpositioninput && captionnode && captionnode.getAttribute('style')) {
|
||||
captionpositioninput.set('value', captionnode.getStyle('caption-side'));
|
||||
} else {
|
||||
// Default to none.
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -929,7 +929,7 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
captioninput.set('value', '');
|
||||
}
|
||||
|
||||
if (captionpositioninput && captionnode.getAttribute('style')) {
|
||||
if (captionpositioninput && captionnode && captionnode.getAttribute('style')) {
|
||||
captionpositioninput.set('value', captionnode.getStyle('caption-side'));
|
||||
} else {
|
||||
// Default to none.
|
||||
|
||||
@@ -927,7 +927,7 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
captioninput.set('value', '');
|
||||
}
|
||||
|
||||
if (captionpositioninput && captionnode.getAttribute('style')) {
|
||||
if (captionpositioninput && captionnode && captionnode.getAttribute('style')) {
|
||||
captionpositioninput.set('value', captionnode.getStyle('caption-side'));
|
||||
} else {
|
||||
// Default to none.
|
||||
|
||||
Reference in New Issue
Block a user