Skip to content

Commit

Permalink
fix: #828 component align exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 committed Jul 27, 2021
1 parent c4989f8 commit b1d1746
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/dialog/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ export default {
contextImage._v_src._linkValue = contextImage.previewSrc.textContent = contextImage.imgUrlFile.value = contextImage._element.src;
}
contextImage._altText = contextImage.altText.value = contextImage._element.alt;
contextImage.modal.querySelector('input[name="suneditor_image_radio"][value="' + contextImage._align + '"]').checked = true;
(contextImage.modal.querySelector('input[name="suneditor_image_radio"][value="' + contextImage._align + '"]') || contextImage.modal.querySelector('input[name="suneditor_image_radio"][value="none"]')).checked = true;
contextImage._align = contextImage.modal.querySelector('input[name="suneditor_image_radio"]:checked').value;
contextImage._captionChecked = contextImage.captionCheckEl.checked = !!contextImage._caption;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dialog/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ export default {
const contextVideo = this.context.video;

if (contextVideo.videoUrlFile) contextVideo._linkValue = contextVideo.preview.textContent = contextVideo.videoUrlFile.value = (contextVideo._element.src || (contextVideo._element.querySelector('source') || '').src || '');
contextVideo.modal.querySelector('input[name="suneditor_video_radio"][value="' + contextVideo._align + '"]').checked = true;
(contextVideo.modal.querySelector('input[name="suneditor_video_radio"][value="' + contextVideo._align + '"]') || contextVideo.modal.querySelector('input[name="suneditor_video_radio"][value="none"]')).checked = true;

if (contextVideo._resizing) {
this.plugins.resizing._module_setModifyInputSize.call(this, contextVideo, this.plugins.video);
Expand Down

0 comments on commit b1d1746

Please sign in to comment.