diff --git a/src/display/annotation_storage.js b/src/display/annotation_storage.js index e1b4fac3a..3bd751192 100644 --- a/src/display/annotation_storage.js +++ b/src/display/annotation_storage.js @@ -13,6 +13,8 @@ * limitations under the License. */ +import { objectFromEntries } from "../shared/util.js"; + /** * Key/value storage for annotation data in forms. */ @@ -67,7 +69,7 @@ class AnnotationStorage { if (this._storage.size === 0) { return null; } - return Object.fromEntries(this._storage); + return objectFromEntries(this._storage); } get size() { diff --git a/src/display/metadata.js b/src/display/metadata.js index d29246228..963eac926 100644 --- a/src/display/metadata.js +++ b/src/display/metadata.js @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "../shared/util.js"; +import { assert, objectFromEntries } from "../shared/util.js"; import { SimpleXMLParser } from "../shared/xml_parser.js"; class Metadata { @@ -118,7 +118,7 @@ class Metadata { } getAll() { - return Object.fromEntries(this._metadataMap); + return objectFromEntries(this._metadataMap); } has(name) { diff --git a/src/display/optional_content_config.js b/src/display/optional_content_config.js index da9f00794..7e664a3e5 100644 --- a/src/display/optional_content_config.js +++ b/src/display/optional_content_config.js @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { warn } from "../shared/util.js"; +import { objectFromEntries, warn } from "../shared/util.js"; class OptionalContentGroup { constructor(name, intent) { @@ -145,7 +145,7 @@ class OptionalContentConfig { if (!this._groups.size) { return null; } - return Object.fromEntries(this._groups); + return objectFromEntries(this._groups); } getGroup(id) {