• Robert Knight's avatar
    Initialize `target` property of new page notes to a single-item array · fa99d0bd
    Robert Knight authored
    Annotations received from the API always have a non-empty `target` array, as do
    annotations and replies created locally that have not yet been saved. Unsaved
    Page Notes were an exception. This led to an error [1] when hovering a new
    unsaved page note in a VitalSource book, due to code not handling an empty
    `target` array.  Resolve this by initializing the `target` field of new page
    notes in the same way as replies and annotations (minus the `selector` property
    that annotations have).
    
    [1] https://hypothesis.sentry.io/issues/3745569320/
    fa99d0bd
Name
Last commit
Last update
.github Loading commit data...
.yarn Loading commit data...
bin Loading commit data...
dev-server Loading commit data...
docs Loading commit data...
embedding-examples Loading commit data...
images Loading commit data...
requirements Loading commit data...
scripts Loading commit data...
src Loading commit data...
.babelrc Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.prettierignore Loading commit data...
.python-version Loading commit data...
.readthedocs.yaml Loading commit data...
.yarnrc.yml Loading commit data...
HACKING.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
codecov.yml Loading commit data...
gulpfile.mjs Loading commit data...
package.json Loading commit data...
pyproject.toml Loading commit data...
rollup-boot.config.mjs Loading commit data...
rollup-tests.config.mjs Loading commit data...
rollup.config.mjs Loading commit data...
tailwind-annotator.config.mjs Loading commit data...
tailwind-sidebar.config.mjs Loading commit data...
tailwind.config.mjs Loading commit data...
tox.ini Loading commit data...
tsconfig.json Loading commit data...
yarn.lock Loading commit data...