Skip to content

[Bug]: Empty values become "null" on editing #2148

Description

@minchinweb

Bug Description

If I select a task without a project selected from the in-note widget, it shows a project of "null" in the edit dialog.

If I delete the "null" project, it removes the project key from the file.

Similarly, if I edit a project with an empty context, it will insert a value of "null" into the Markdown file.

Steps to Reproduce

TaskNotes Debug Info

SYSTEM INFO:
	Obsidian version: 1.12.7
	Installer version: 1.12.7
	Operating system: Windows 10 Pro 10.0.19045
	Login status: not logged in
	Language: en
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: Minimal 8.2.0
	Snippets enabled: 29
	Restricted mode: off
	Plugins installed: 50
	Plugins enabled: 27
		1: Calendar v1.5.10
		2: Tab Switcher v1.4.0
		3: Linter v1.32.0
		4: Note Refactor v1.8.2
		5: Open vault in VS Code v1.5.0
		6: Periodic Notes v0.0.17
		7: Tag Wrangler v0.6.4
		8: Better Word Count v0.10.1
		9: Plugin Update Tracker v1.7.0
		10: Style Settings v1.0.9
		11: Minimal Theme Settings v8.2.3
		12: Advanced Tables v0.23.2
		13: Sort and Permute lines v0.8.0
		14: Pane Relief v0.5.9
		15: Show Current File Path v0.5.2
		16: Omnisearch v1.29.3
		17: Extended Markdown Syntax v2.0.11
		18: Quick Switcher++ v6.1.5
		19: Map View v6.1.4
		20: Footnote Shortcut v0.1.3
		21: Colored Tags v6.1.3
		22: Better Properties v1.0.0
		23: Timekeep v2.1.3
		24: Tracker v1.19.0
		25: Git v2.38.6
		26: Frontmatter Markdown Links v2.7.6
		27: TaskNotes v4.11.1

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Affected Task Frontmatter

Relevant Bases File Content

Relevant Settings or Customizations

No response

Console Errors or Logs

Screenshots or Screen Recording

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions