mirror of
https://gitlab.com/mojo42/Jirafeau.git
synced 2025-04-22 12:36:17 +02:00
[BUGFIX] Prevent addCopyListener to add event on undefined button when preview option set to false
This commit is contained in:
parent
08efa741a5
commit
96f7e6adb9
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user