Skip to content

Commit

Permalink
🐛 fix creating note with default path
Browse files Browse the repository at this point in the history
  • Loading branch information
ulisesantana committed Jan 26, 2023
1 parent 8bf2b22 commit 57ffb96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"deploy": "npm clean-install --omit=dev && npm run build",
"dev": "node esbuild.config.mjs",
"lint": "eslint . --ext .ts",
"lint:fix": "npm run lint -- --fix",
"lint:fix": "npm run lint -- --fix",
"tag": "node version-bump.mjs && TAG=$(node -pe \"require('./package.json').version\"); git commit -am \"🔖 $TAG\" && git tag $TAG && git push --tags",
"test": "jest --verbose --coverage",
"test:all": "npm t && npm run test:deploy",
Expand Down
2 changes: 1 addition & 1 deletion src/views/MainView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class MainView extends ItemView {
private createNote(note: string, event: UserEvent): Promise<string[]> {
const noteFile = note + '.md'
const defaultFolder = this.app.fileManager.getNewFileParent("")
const pathDivider = defaultFolder.parent.path.includes('\\')? '\\' : '/'
const pathDivider = defaultFolder.path.includes('\\')? '\\' : '/'
return this.app.vault.create(defaultFolder.path + pathDivider + noteFile,'')
.then(() => {
const mod = Keymap.isModEvent(event);
Expand Down

0 comments on commit 57ffb96

Please sign in to comment.