From af567e9eb037d231d4467c8f15687ddb49711a40 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Thu, 20 Feb 2025 14:45:48 -0800 Subject: [PATCH] Fix What's New URL checking logic to compare port correctly In a normal HTTP URL the port will be nil, which doesn't equal itself. This bug was introduced by #1561 when it tried to add more granular comparison to URL checking to allow for anchor links. --- src/MacVim/MMWhatsNewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MacVim/MMWhatsNewController.m b/src/MacVim/MMWhatsNewController.m index 12daddb5e1..4000d13df4 100644 --- a/src/MacVim/MMWhatsNewController.m +++ b/src/MacVim/MMWhatsNewController.m @@ -171,7 +171,7 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati if ([requestURL.scheme isEqual:_whatsNewURL.scheme] && [requestURL.host isEqual:_whatsNewURL.host] && - [requestURL.port isEqual:_whatsNewURL.port] && + requestURL.port.integerValue == _whatsNewURL.port.integerValue && [requestURL.path isEqual:_whatsNewURL.path] && [requestURL.query isEqual:_whatsNewURL.query]) {