• Robert Knight's avatar
    Fix null-safety errors · e36b238f
    Robert Knight authored
    Various methods in `DocumentMeta` assume that `this.metadata.{dc,
    highwire, ...}` properties exist, but this is only true once the
    `getDocumentMetadata()` function has been called.
    
    Adjust the constructor so that these fields always exist.
    
    Note that while this avoids an exception if calling certain methods before
    `getDocumentMetadata`, it would still be a logical error if that
    happened. For the moment such a mistake is just silently ignored.
    e36b238f
annotator.js 1.42 KB