Setting Permalink to empty (aka, permalink to root), defaults to slugified title on Update
bppdddqqqq opened this issue · comments
Reason for this issue
Expected behaviour should be letting me set the permalink to / (aka empty) or write an error explaining why it's not possible (the issue is present even when there are no paths set to /)
Steps to Reproduce
- Create a new page
- Set permalink to empty
The issue seems to stem from the onEvent "save-post" callback located in @factor/post/el/permalink.vue
.
if (!this.value && this.post.title) { this.emit(this.post.title) }
It evaluates the permalink string and if it's falsy, it emits the title as a new permalink.
One of the falsy evaluations is an empty string, which results into this behaviour.