Skip to content

Commit 7ce1831

Browse files
committed
Removed unnecessary condition to rewrite Next.js hrefs in HTML processor.
1 parent 3998238 commit 7ce1831

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/common/src/html_processor.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,6 @@ pub fn create_html_processor(config: HtmlProcessorConfig) -> impl StreamProcesso
235235
let patterns = patterns.clone();
236236
move |text| {
237237
let content = text.as_str();
238-
if !content.contains(&patterns.origin_host) {
239-
return Ok(());
240-
}
241238
if let Some(rewritten) = patterns.rewrite_nextjs_hrefs(content) {
242239
text.replace(&rewritten, ContentType::Text);
243240
}
@@ -249,7 +246,7 @@ pub fn create_html_processor(config: HtmlProcessorConfig) -> impl StreamProcesso
249246
let patterns = patterns.clone();
250247
move |text| {
251248
let content = text.as_str();
252-
if !content.contains("self.__next_f") || !content.contains(&patterns.origin_host) {
249+
if !content.contains("self.__next_f") {
253250
return Ok(());
254251
}
255252
if let Some(rewritten) = patterns.rewrite_nextjs_hrefs(content) {

0 commit comments

Comments
 (0)