From ea5ff77e29fcc8af2e61e1b549ecbfff1f4fcf98 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 5 Nov 2023 15:46:05 -0800 Subject: [PATCH] os: macos lang check should include lang null --- src/os/locale.zig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/os/locale.zig b/src/os/locale.zig index c05fa9d6b..3c3f35fcf 100644 --- a/src/os/locale.zig +++ b/src/os/locale.zig @@ -21,10 +21,8 @@ pub fn ensureLocale(alloc: std.mem.Allocator) !void { // process. if (comptime builtin.target.isDarwin()) { // Set the lang if it is not set or if its empty. - if (lang) |l| { - if (l.value.len == 0) { - setLangFromCocoa(); - } + if (lang == null or lang.?.value.len == 0) { + setLangFromCocoa(); } }