Skip to content

Conversation

@aalasolutions
Copy link

fix: Do not update the title if it is empty

fix: Do not update the title if it is empty
@knownasilya
Copy link
Contributor

@aalasolutions what was the issue you encountered?

@knownasilya
Copy link
Contributor

Looks like prettier needs to run on the code changes

@aalasolutions
Copy link
Author

@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.

@knownasilya
Copy link
Contributor

@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.

@aalasolutions
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants