mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 09:56:15 -04:00
Merge pull request #2831 from fcassin/develop
Protect against a null atext value in cloneAText
This commit is contained in:
commit
f44c444720
2 changed files with 12 additions and 5 deletions
|
@ -1628,10 +1628,12 @@ exports.applyToAText = function (cs, atext, pool) {
|
|||
* @param atext {AText}
|
||||
*/
|
||||
exports.cloneAText = function (atext) {
|
||||
return {
|
||||
text: atext.text,
|
||||
attribs: atext.attribs
|
||||
};
|
||||
if (atext) {
|
||||
return {
|
||||
text: atext.text,
|
||||
attribs: atext.attribs
|
||||
}
|
||||
} else exports.error("atext is null");
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue