File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,6 +147,10 @@ async function listsNewTag() {
147147
148148 if ( result . status == 1 ) {
149149 if ( result . data && result . data . items && Array . isArray ( result . data . items ) ) {
150+ if ( result . data . items . length == 0 ) {
151+ console . log ( '无法找到转发列表,可能是IP原因' )
152+ return
153+ }
150154 let shareIdx = Math . floor ( Math . random ( ) * result . data . items . length )
151155 newsItem = result . data . items [ shareIdx ]
152156 await $ . wait ( 1000 )
Original file line number Diff line number Diff line change @@ -150,6 +150,10 @@ async function listsNewTag() {
150150
151151 if ( result . status == 1 ) {
152152 if ( result . data && result . data . items && Array . isArray ( result . data . items ) ) {
153+ if ( result . data . items . length == 0 ) {
154+ console . log ( '无法找到转发列表,可能是IP原因' )
155+ return
156+ }
153157 let shareIdx = Math . floor ( Math . random ( ) * result . data . items . length )
154158 newsItem = result . data . items [ shareIdx ]
155159 await $ . wait ( 1000 )
Original file line number Diff line number Diff line change @@ -147,6 +147,10 @@ async function listsNewTag() {
147147
148148 if ( result . status == 1 ) {
149149 if ( result . data && result . data . items && Array . isArray ( result . data . items ) ) {
150+ if ( result . data . items . length == 0 ) {
151+ console . log ( '无法找到转发列表,可能是IP原因' )
152+ return
153+ }
150154 let shareIdx = Math . floor ( Math . random ( ) * result . data . items . length )
151155 newsItem = result . data . items [ shareIdx ]
152156 await $ . wait ( 1000 )
You can’t perform that action at this time.
0 commit comments