Skip to content
Merged
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
6 changes: 3 additions & 3 deletions bifrost/lib/turbolinks/location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export class Location {
static wrap(locatable: Locatable): Location;
static wrap(locatable?: Locatable | null): Location | undefined;
static wrap(locatable: Locatable) {
if (typeof locatable == "string") {
return new this(locatable);
} else if (locatable != null) {
if (locatable instanceof Location) {
return locatable;
} else {
return new Location(locatable);
}
}

Expand Down