@@ -18,7 +18,7 @@ function parseOptions(options) {
1818 if ( options ?. gridIntensity ) {
1919 adjustments . gridIntensity = { } ;
2020 const { device, dataCenter, network } = options . gridIntensity ;
21- if ( device ) {
21+ if ( device || device === 0 ) {
2222 if ( typeof device === "object" ) {
2323 if ( ! averageIntensity . data [ device . country ?. toUpperCase ( ) ] ) {
2424 console . warn (
@@ -47,7 +47,7 @@ function parseOptions(options) {
4747 ) ;
4848 }
4949 }
50- if ( dataCenter ) {
50+ if ( dataCenter || dataCenter === 0 ) {
5151 if ( typeof dataCenter === "object" ) {
5252 if ( ! averageIntensity . data [ dataCenter . country ?. toUpperCase ( ) ] ) {
5353 console . warn (
@@ -76,7 +76,7 @@ function parseOptions(options) {
7676 ) ;
7777 }
7878 }
79- if ( network ) {
79+ if ( network || network === 0 ) {
8080 if ( typeof network === "object" ) {
8181 if ( ! averageIntensity . data [ network . country ?. toUpperCase ( ) ] ) {
8282 console . warn (
@@ -107,7 +107,7 @@ function parseOptions(options) {
107107 }
108108 }
109109
110- if ( options ?. dataReloadRatio ) {
110+ if ( options ?. dataReloadRatio || options . dataReloadRatio === 0 ) {
111111 if ( typeof options . dataReloadRatio === "number" ) {
112112 if ( options . dataReloadRatio >= 0 && options . dataReloadRatio <= 1 ) {
113113 adjustments . dataReloadRatio = options . dataReloadRatio ;
@@ -127,7 +127,7 @@ function parseOptions(options) {
127127 }
128128 }
129129
130- if ( options ?. firstVisitPercentage ) {
130+ if ( options ?. firstVisitPercentage || options . firstVisitPercentage === 0 ) {
131131 if ( typeof options . firstVisitPercentage === "number" ) {
132132 if (
133133 options . firstVisitPercentage >= 0 &&
@@ -148,7 +148,7 @@ function parseOptions(options) {
148148 }
149149 }
150150
151- if ( options ?. returnVisitPercentage ) {
151+ if ( options ?. returnVisitPercentage || options . returnVisitPercentage === 0 ) {
152152 if ( typeof options . returnVisitPercentage === "number" ) {
153153 if (
154154 options . returnVisitPercentage >= 0 &&
0 commit comments