fictionco / fiction

(Public Release Summer 2024) Personal Marketing Platform. A powerful platform for your online identity.

Home Page:https://www.fiction.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Create a new page
  2. 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.