Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 0c0944b

Browse files
Fix: set error value correctly in Image component
1 parent b0c6e89 commit 0c0944b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
44

55
## Unreleased
66

7+
### Bugfixes
8+
9+
- When `Image` component is editable, the value error will be set if there is no image available, which means the error component (default or custom) wis displayed correctly.
10+
711
## 2.7.0 ( January 20, 2022 )
812

913
### New features

src/components/image/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function Image({
7979

8080
const { value, thing, error: thingError } = values;
8181
let valueError;
82-
if (!edit && !value) {
82+
if (!value) {
8383
valueError = new Error("No value found for property.");
8484
}
8585
const isFetchingThing = !thing && !thingError;

0 commit comments

Comments
 (0)