Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent page title to set to empty string #253

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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