Skip to content

Commit b40e7ec

Browse files
committed
no nullable url on Navigation pushEntry
1 parent 9c4367b commit b40e7ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/browser/navigation/Navigation.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ pub fn processNavigation(self: *Navigation, page: *Page) !void {
127127

128128
/// Pushes an entry into the Navigation stack WITHOUT actually navigating to it.
129129
/// For that, use `navigate`.
130-
pub fn pushEntry(self: *Navigation, _url: ?[]const u8, state: ?[]const u8, page: *Page, dispatch: bool) !*NavigationHistoryEntry {
130+
pub fn pushEntry(self: *Navigation, _url: []const u8, state: ?[]const u8, page: *Page, dispatch: bool) !*NavigationHistoryEntry {
131131
const arena = page.session.arena;
132132

133-
const url = if (_url) |u| try arena.dupe(u8, u) else null;
133+
const url = try arena.dupe(u8, _url);
134134

135135
// truncates our history here.
136136
if (self.entries.items.len > self.index + 1) {

0 commit comments

Comments
 (0)