Skip to content

Commit

Permalink
fix: ensure store exists in ytype (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkskygit authored Aug 10, 2023
1 parent af5a3a7 commit 7f70391
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libs/jwst-codec/src/doc/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,13 @@ impl DocStore {
_ => {}
};

// assign store in ytype to ensure store exists if a ytype not has any children
if let Content::Type(ty) = item.content.as_ref() {
if let Some(ty) = ty.get() {
ty.write().unwrap().store = Arc::downgrade(&store_ref);
}
}

Ok(())
}

Expand Down

1 comment on commit 7f70391

@vercel
Copy link

@vercel vercel bot commented on 7f70391 Aug 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.