Open aalasolutions opened 1 year ago
@aalasolutions what was the issue you encountered?
Looks like prettier needs to run on the code changes
@knownasilya I just used the github to edit the file on browser so lint issue.
Problem I had is I have just starting using this in an app, where afterModel
is used to update the page title. That is done in whole app. I used this component on one page, but when I go to any other page which do not have page-title helper, it just removes the page title. So if a title is set in afterModel, that is removed, set to ''
empty string.
So in short, willDestroy
is called when I transition to any other route. which calls scheduleTitleUpdate
and then _updateTitle
and here empty title is being set.
Saying that, just thinking that this will prevent any one from using {{page-title ''}}
not sure if any one would need that.
@aalasolutions could you create a reproduction repo or test in this repo? I haven't seen this issue and don't want this to break many people's apps.
@knownasilya created this repo https://github.com/aalasolutions/ember-page-title-test-repo
fix: Do not update the title if it is empty