Skip to content

Commit

Permalink
0.9.996
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-cen committed Jul 27, 2024
1 parent 3c3c7e1 commit 520f5d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -136045,7 +136045,7 @@ var SpaceTreeComponent = (props) => {
if (selectedPaths.length <= 1) {
if (!selectedPaths[0] || selectedPaths[0].item.path != activePath)
setSelectedPaths([]);
if (superstate.settings.revealActiveFile)
if (superstate.settings.revealActiveFile && activePath)
revealPath(activePath);
}
props.superstate.ui.eventsDispatch.addListener(
Expand Down Expand Up @@ -136081,7 +136081,7 @@ var SpaceTreeComponent = (props) => {
const revealPath = (0, import_react149.useCallback)(
(path2) => {
const parentSpaces = activeViewSpaces?.filter(
(f2) => path2.startsWith(f2?.path) || f2?.path == "/"
(f2) => path2?.startsWith(f2?.path) || f2?.path == "/"
) ?? [];
if (!path2 || parentSpaces.length == 0)
return;
Expand Down Expand Up @@ -136111,7 +136111,7 @@ var SpaceTreeComponent = (props) => {
);
(0, import_react149.useEffect)(() => {
const handleRevealPathEvent = (evt) => {
if (evt.detail)
if (evt.detail.path)
revealPath(evt.detail.path);
};
window.addEventListener(eventTypes.revealPath, handleRevealPathEvent);
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "make-md",
"name": "MAKE.md",
"version": "0.9.995",
"version": "0.9.996",
"minAppVersion": "0.16.0",
"description": "Make.md brings powerful and modern note-taking features to Obsidian. Capture, organize and connect information with more flexibility without any code.",
"author": "MAKE.md",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ export const SpaceTreeComponent = (props: SpaceTreeComponentProps) => {
if (selectedPaths.length <= 1) {
if (!selectedPaths[0] || selectedPaths[0].item.path != activePath)
setSelectedPaths([]);
if (superstate.settings.revealActiveFile) revealPath(activePath);
if (superstate.settings.revealActiveFile && activePath)
revealPath(activePath);
}
props.superstate.ui.eventsDispatch.addListener(
"activePathChanged",
Expand Down Expand Up @@ -355,7 +356,7 @@ export const SpaceTreeComponent = (props: SpaceTreeComponentProps) => {
(path: string) => {
const parentSpaces =
activeViewSpaces?.filter(
(f) => path.startsWith(f?.path) || f?.path == "/"
(f) => path?.startsWith(f?.path) || f?.path == "/"
) ?? [];
if (!path || parentSpaces.length == 0) return;

Expand Down Expand Up @@ -396,7 +397,7 @@ export const SpaceTreeComponent = (props: SpaceTreeComponentProps) => {

useEffect(() => {
const handleRevealPathEvent = (evt: CustomVaultChangeEvent) => {
if (evt.detail) revealPath(evt.detail.path);
if (evt.detail.path) revealPath(evt.detail.path);
};
window.addEventListener(eventTypes.revealPath, handleRevealPathEvent);
return () => {
Expand Down

0 comments on commit 520f5d0

Please sign in to comment.