Skip to content

Commit 759af06

Browse files
authored
Merge pull request #1 from chenkasirer/main
using default_factory in default config
2 parents 98638f6 + c9fd904 commit 759af06

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
* Fixed `ValueError` when starting viewer for the first time with default config.
15+
1416
### Removed
1517

1618

src/compas_notebook/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CameraConfig:
1919
@dataclass
2020
class ViewConfig:
2121
viewport: Literal["top", "perspective"] = "perspective"
22-
background: Color = Color.from_hex("#eeeeee")
22+
background: Color = field(default_factory=lambda: Color.from_hex("#eeeeee"))
2323
width: float = 1100
2424
height: float = 580
2525
show_grid: bool = True

0 commit comments

Comments
 (0)