mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 14:36:08 -04:00
prevent error when attachments are disabled, but paste with attachment gets displayed
This commit is contained in:
parent
5617612eb3
commit
36cb37c029
4 changed files with 9 additions and 2 deletions
|
@ -2816,6 +2816,9 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
*/
|
||||
me.setAttachment = function(attachmentData, fileName)
|
||||
{
|
||||
// skip, if attachments got disabled
|
||||
if (!$attachmentLink || !$attachmentPreview) return;
|
||||
|
||||
// data URI format: data:[<mimeType>][;base64],<data>
|
||||
|
||||
// position in data URI string of where data begins
|
||||
|
@ -2859,6 +2862,9 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
*/
|
||||
me.showAttachment = function()
|
||||
{
|
||||
// skip, if attachments got disabled
|
||||
if (!$attachment || !$attachmentPreview) return;
|
||||
|
||||
$attachment.removeClass('hidden');
|
||||
|
||||
if (attachmentHasPreview) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue