Commit 96f7e6ad authored by sebastien's avatar sebastien Committed by Jérôme Jutteau

[BUGFIX] Prevent addCopyListener to add event on undefined button when preview option set to false

parent 08efa741
......@@ -742,8 +742,10 @@ function copyLinkToClipboard(link_id) {
}
function addCopyListener(button_id, link_id) {
document.getElementById(button_id)
if(document.getElementById(button_id)){
document.getElementById(button_id)
.addEventListener("click", function() {
copyLinkToClipboard(link_id);});
}
}
// @license-end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment