Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 415fdfc

Browse files
committed
mjs
1 parent b51f90a commit 415fdfc

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
"version": "2.8.4",
44
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
55
"main": "main.js",
6-
"type": "module",
76
"scripts": {
8-
"dev": "rollup --config rollup.config.js -w",
9-
"build": "rollup --config rollup.config.js",
7+
"dev": "rollup --config rollup.config.mjs -w",
8+
"build": "rollup --config rollup.config.mjs",
109
"test": "jest --colors --coverage test",
1110
"pretest": "eslint --ignore-path .gitignore src/**/*.ts"
1211
},

rollup.config.js renamed to rollup.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const getRollupPlugins = (tsconfig, ...plugins) =>
2323
nodeResolve({ browser: true }),
2424
json(),
2525
commonjs(),
26-
terser(),
2726
// This is needed to make work the plugin on mobile
2827
replace({
2928
'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'),

src/helpers/VaultManagement.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,13 @@ export async function sourceDataviewPages(ddbbConfig: LocalSettings, folderPath:
132132
);
133133
break;
134134
case SourceDataTypes.CURRENT_FOLDER_WITHOUT_SUBFOLDERS:
135-
pagesResult = DataviewService.getDataviewAPI().pages(`"${folderPath}"`)
136-
.where(p => (p.file as any).folder === folderPath);
135+
if (!folderPath || folderPath === '/') {
136+
pagesResult = DataviewService.getDataviewAPI().pages()
137+
.where(p => !(p.file as any).folder);
138+
} else {
139+
pagesResult = DataviewService.getDataviewAPI().pages(`"${folderPath}"`)
140+
.where(p => (p.file as any).folder === folderPath);
141+
}
137142
break;
138143
default:
139144
pagesResult = DataviewService.getDataviewAPI().pages(`"${folderPath}"`);

0 commit comments

Comments
 (0)