mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 14:36:08 -04:00
added test for setMessage function, fixing bug for elements with only one child
This commit is contained in:
parent
61a59911b8
commit
b992bcc732
4 changed files with 53 additions and 5 deletions
|
@ -136,7 +136,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
|
|||
setMessage: function(element, message)
|
||||
{
|
||||
var content = element.contents();
|
||||
if (content.length > 0)
|
||||
if (content.length > 1)
|
||||
{
|
||||
content[content.length - 1].nodeValue = ' ' + message;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue