File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -968,8 +968,11 @@ cloudopt.grade = (function (cloudopt) {
968968 if ( level <= 2 ) {
969969 safe = true ;
970970 }
971- if ( level === 3 && config . safePotential ) {
971+ if ( level === 3 ) {
972+ if ( config . safePotential )
972973 safe = false ;
974+ else
975+ safe = true ;
973976 }
974977 if ( config . whiteList . indexOf ( result . host ) > - 1 || config . whiteListAds . indexOf ( result . host ) > - 1 ) {
975978 safe = true ;
@@ -1240,7 +1243,9 @@ cloudopt.http = (function (cloudopt) {
12401243 const _result = await $ . ajax ( this . option ) ;
12411244 resolve ( _result )
12421245 } catch ( error ) {
1243- const _response = ( error && ( typeof error . responseText === 'string' ) ) ? JSON . parse ( error . responseText ) : { }
1246+ var _response = { } ;
1247+ if ( error && error . status && error . status >= 400 && error . status < 500 && ( typeof error . responseText === 'string' ) )
1248+ _response = JSON . parse ( error . responseText )
12441249 if ( isResolveErr ) this . handleHttpErrorStatus ( _response ) ;
12451250 reject ( _response )
12461251 cloudopt . logger . debug ( error . responseText )
You can’t perform that action at this time.
0 commit comments