mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #14044 from calixteman/bug1719148
Annotations - Avoid empty value in text field when storage contains something for it (bug 1719148)
This commit is contained in:
commit
20eb6ca2ec
2 changed files with 24 additions and 1 deletions
|
@ -42,7 +42,12 @@ class AnnotationStorage {
|
|||
* @returns {Object}
|
||||
*/
|
||||
getValue(key, defaultValue) {
|
||||
return this._storage.get(key) ?? defaultValue;
|
||||
const value = this._storage.get(key);
|
||||
if (value === undefined) {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
return Object.assign(defaultValue, value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue