mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-03 19:24:48 +08:00
fix bug with truncating string
This commit is contained in:
parent
acd6efae57
commit
40f3365596
1 changed files with 2 additions and 2 deletions
|
@ -28,12 +28,12 @@ function truncateLongString( el, chars ) {
|
|||
}
|
||||
|
||||
if ( html ) {
|
||||
el.html(html.outerHTML + newText + '...' );
|
||||
el.text(html.outerHTML + newText + '...' );
|
||||
} else {
|
||||
if($.type(el) === 'string'){
|
||||
return newText + '...';
|
||||
} else {
|
||||
el.html(newText + '...' );
|
||||
el.text(newText + '...' );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue