diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cb5f654..87c84b56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Fixed a bug where box fill colours would cover box text, and changed the implementation of `hide` style option. - Removed double quotes when rendering objects of type `None`. +- Removed double quotes when rendering objects that are not of type `str`. ### 📚 Documentation and demo website changes diff --git a/memory-viz/src/memory_model.ts b/memory-viz/src/memory_model.ts index 3dcdc16b..99001d8f 100644 --- a/memory-viz/src/memory_model.ts +++ b/memory-viz/src/memory_model.ts @@ -223,10 +223,10 @@ export class MemoryModel { let display_text; if (type === "bool") { display_text = value ? "True" : "False"; - } else if (type === "None") { - display_text = "None"; - } else { + } else if (type === "str") { display_text = JSON.stringify(value); + } else { + display_text = String(value); } if (value !== null && value !== undefined) {