From 2c46b2ad1c21162dd44fa84b3aab275877d18df5 Mon Sep 17 00:00:00 2001
From: Andvari <31068367+dzx-dzx@users.noreply.github.com>
Date: Mon, 6 Oct 2025 22:56:44 +0800
Subject: [PATCH] fix(route/caixin): Handle occasional occurrence of
nonexistent video content (#20241)
---
lib/routes/caixin/templates/article.art | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/routes/caixin/templates/article.art b/lib/routes/caixin/templates/article.art
index fd30a943e..25839ba2a 100644
--- a/lib/routes/caixin/templates/article.art
+++ b/lib/routes/caixin/templates/article.art
@@ -13,10 +13,12 @@
{{ if $('.article .content_video').length }}
<% const video = $('script').text().match(/initPlayer\('(.*?)','(.*?)'\)/); %>
- <% const videoUrl = video[1]; %>
- <% const poster = video[2]; %>
-
-
+ {{ if video}}
+ <% const videoUrl = video[1]; %>
+ <% const poster = video[2]; %>
+
+
+ {{ /if }}
{{ /if }}
{{ if $('div#Main_Content_Val.text').length }}