Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

issue #40 route always emptied title field with no reason - title is no ... #41

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -714,14 +714,13 @@ class Router {
});

void _go(String path, String title, bool replace) {
if (title == null) title = '';
if (_useFragment) {
if (replace) {
_window.location.replace('#$path');
} else {
_window.location.assign('#$path');
}
(_window.document as HtmlDocument).title = title;
if (title != null)(_window.document as HtmlDocument).title = title;
} else {
if (replace) {
_window.history.replaceState(null, title, path);
Expand Down