diff --git a/CHANGELOG.md b/CHANGELOG.md
index c1d672f1..44c45039 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog
+## 0.3.3 - 2024-02-06
+
+### 🐛 Fix a bug
+
+- Fix crash when creating new diagram
+- Fix typo in readme (imports)
+
## 0.3.2 - 2024-02-06
### ⚡️ Improve performance
diff --git a/CodeMirror6/CodeMirror6.csproj b/CodeMirror6/CodeMirror6.csproj
index 3965b60b..ed6ef8d5 100644
--- a/CodeMirror6/CodeMirror6.csproj
+++ b/CodeMirror6/CodeMirror6.csproj
@@ -9,7 +9,7 @@
GaelJ.BlazorCodeMirror6
true
GaelJ.BlazorCodeMirror6
- 0.3.2
+ 0.3.3
true
snupkg
true
diff --git a/CodeMirror6/NodeLib/src/CmDiagrams.ts b/CodeMirror6/NodeLib/src/CmDiagrams.ts
index 085bd1b1..d6710030 100644
--- a/CodeMirror6/NodeLib/src/CmDiagrams.ts
+++ b/CodeMirror6/NodeLib/src/CmDiagrams.ts
@@ -149,7 +149,7 @@ class DiagramWidget extends WidgetType {
const container = document.createElement('div')
container.setAttribute('aria-hidden', 'true')
- if (this.svgContent === null) {
+ if (this.svgContent === null || this.svgContent === undefined) {
container.innerHTML = `Loading ${this.language} diagram...`
container.style.fontStyle = 'italic'
container.style.color = 'gray'
@@ -157,11 +157,13 @@ class DiagramWidget extends WidgetType {
else {
container.innerHTML = this.svgContent
const svgElement = container.getElementsByTagName("svg")[0]
- svgElement.setAttribute('aria-hidden', 'true')
- svgElement.style.backgroundColor = 'white'
- svgElement.style.maxHeight = '800px'
- svgElement.style.maxWidth = 'calc(100% - 2em)'
- svgElement.style.objectFit = 'scale-down'
+ if (svgElement !== null && svgElement !== undefined) {
+ svgElement.setAttribute('aria-hidden', 'true')
+ svgElement.style.backgroundColor = 'white'
+ svgElement.style.maxHeight = '800px'
+ svgElement.style.maxWidth = 'calc(100% - 2em)'
+ svgElement.style.objectFit = 'scale-down'
+ }
container.style.fontStyle = ''
container.style.color = ''
container.style.backgroundColor = 'transparent'
diff --git a/Examples.BlazorServer/Examples.BlazorServer.csproj b/Examples.BlazorServer/Examples.BlazorServer.csproj
index 2d69aa5a..59a3d2a0 100644
--- a/Examples.BlazorServer/Examples.BlazorServer.csproj
+++ b/Examples.BlazorServer/Examples.BlazorServer.csproj
@@ -4,7 +4,7 @@
enable
false
enable
- 0.3.2
+ 0.3.3
diff --git a/Examples.BlazorServerInteractive/Examples.BlazorServerInteractive.csproj b/Examples.BlazorServerInteractive/Examples.BlazorServerInteractive.csproj
index 3a0b5eac..50ae27e1 100644
--- a/Examples.BlazorServerInteractive/Examples.BlazorServerInteractive.csproj
+++ b/Examples.BlazorServerInteractive/Examples.BlazorServerInteractive.csproj
@@ -4,7 +4,7 @@
enable
enable
false
- 0.3.2
+ 0.3.3
diff --git a/Examples.BlazorWasm/Examples.BlazorWasm.csproj b/Examples.BlazorWasm/Examples.BlazorWasm.csproj
index c6c863cf..dd21547f 100644
--- a/Examples.BlazorWasm/Examples.BlazorWasm.csproj
+++ b/Examples.BlazorWasm/Examples.BlazorWasm.csproj
@@ -4,7 +4,7 @@
enable
enable
false
- 0.3.2
+ 0.3.3
diff --git a/Examples.Common/Examples.Common.csproj b/Examples.Common/Examples.Common.csproj
index 10364307..33fbbe1d 100644
--- a/Examples.Common/Examples.Common.csproj
+++ b/Examples.Common/Examples.Common.csproj
@@ -5,7 +5,7 @@
enable
enable
false
- 0.3.2
+ 0.3.3
diff --git a/NEW_CHANGELOG.md b/NEW_CHANGELOG.md
index 05361261..766f5657 100644
--- a/NEW_CHANGELOG.md
+++ b/NEW_CHANGELOG.md
@@ -1,16 +1,4 @@
-### ⚡️ Improve performance
-
-- Add "Visible" property to allow hiding the editor without destroying it
-
-### ✨ Introduce new features
-
-- Add linting that checks csv column count relative to first line
-- Disable initial setting of line wrapping in csv mode
-
### 🐛 Fix a bug
-- Fix tabulating csv columns skipped the last / first ones
-
-### 📝 Add or update documentation
-
-- Update README
+- Fix crash when creating new diagram
+- Fix typo in readme (imports)
diff --git a/README.md b/README.md
index c801fc9c..e55c5fc2 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,7 @@ Visit the [live demo](https://gaelj.github.io/BlazorCodeMirror6/) to see the com
## Quick Start
- add the nuget package [GaelJ.BlazorCodeMirror6](https://www.nuget.org/packages/GaelJ.BlazorCodeMirror6/)
-- Add `@using using GaelJ.BlazorCodeMirror6`, `@using GaelJ.BlazorCodeMirror6.Commands` and `@using GaelJ.BlazorCodeMirror6.Models.BlazorCodeMirror6` in your `_Imports.razor` or page/component
+- Add `@using GaelJ.BlazorCodeMirror6`, `@using GaelJ.BlazorCodeMirror6.Commands` and `@using GaelJ.BlazorCodeMirror6.Models` in your `_Imports.razor` or page/component
- Use the `` component as demonstrated in `Examples.Common/Example.razor`
## Examples