From 6cc99df83e9b72436ba5d79b7ad2829d73ec5a2f Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 10 Dec 2015 13:18:54 +0100 Subject: [PATCH] [FIX] web_editor: error when paste without any content in clipboard --- addons/web_editor/static/src/js/summernote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js index 2b2c26bfb68..a6f0e4aaa99 100644 --- a/addons/web_editor/static/src/js/summernote.js +++ b/addons/web_editor/static/src/js/summernote.js @@ -2298,7 +2298,7 @@ function summernote_paste (event) { // keep norma feature if copy a picture var clipboardData = event.originalEvent.clipboardData; - if (clipboardData.items) { + if (!_.isEmpty(clipboardData.items)) { var item = list.last(clipboardData.items); var isClipboardImage = item.kind === 'file' && item.type.indexOf('image/') !== -1; if (isClipboardImage) {