Skip to content

Commit a3a04e0

Browse files
committed
Hotfix undefined errors related to selectors.
1 parent 1d90b73 commit a3a04e0

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@samvera/clover-iiif",
3-
"version": "2.16.4",
3+
"version": "2.16.7",
44
"description": "Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source.",
55
"files": [
66
"dist"

src/components/Viewer/InformationPanel/Annotation/Item.styled.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const annotationItemRow: CSS = {
1111
color: "inherit",
1212
background: "none",
1313
borderRadius: "3px",
14+
border: "none",
1415
};
1516

1617
const ButtonStyled = styled("button", {

src/components/Viewer/InformationPanel/Annotation/VTT/Cue.styled.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ export const Item = styled(RadioGroup.Item, {
1515
textAlign: "left",
1616
flexGrow: 1,
1717
margin: 0,
18+
marginLeft: "-1rem",
1819
padding: "0.618rem 1rem",
19-
width: "100%",
20+
width: "calc(100% + 2rem)",
2021
fontSize: "1rem",
2122

2223
strong: {

src/components/Viewer/Player/Player.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ const Player: React.FC<PlayerProps> = ({
190190
if (!video) return;
191191

192192
// @ts-ignore
193-
const { type, t, value } = contentStateAnnotation?.target?.selector;
193+
const selector = contentStateAnnotation?.target?.selector;
194+
const { type, t, value } = selector || {};
194195
const targetSource =
195196
// @ts-ignore
196197
contentStateAnnotation?.target?.source ||

src/components/Viewer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const RenderViewer: React.FC<CloverViewerProps> = ({
152152
canvasIdCallback(activeCanvas);
153153
}
154154

155-
if (contentStateCallback) {
155+
if (contentStateCallback && activeManifest && activeCanvas) {
156156
const targetSourceId = visibleCanvases[0]?.id || activeCanvas;
157157
const annotationId = `${activeManifest}/state/${hashCode(targetSourceId + JSON.stringify(activeSelector))}`;
158158

0 commit comments

Comments
 (0)