Skip to content

Commit

Permalink
Update drawPrimitive to remove quotation marks from non-str objects
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonieaj committed Jun 18, 2024
1 parent 399a80e commit 647686d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions memory-viz/src/memory_model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 647686d

Please sign in to comment.