Skip to content

Commit d6e2b0e

Browse files
Merge pull request #121 from m-mohr/patch-1
Potential fix for #120
2 parents e9185e0 + cf8ddfb commit d6e2b0e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/georaster-layer-for-leaflet.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -607,18 +607,18 @@ const GeoRasterLayer: (new (options: GeoRasterLayerOptions) => any) & typeof L.C
607607
this.currentStats.maxs[bandIndex] = max;
608608
this.currentStats.ranges[bandIndex] = max - min;
609609
}
610-
if (this._dynamic) {
611-
try {
612-
const rawToRgbFn = (rawToRgb as any).default || rawToRgb;
613-
this.rawToRgb = rawToRgbFn({
614-
format: "string",
615-
flip: this.currentStats.mins.length === 1 ? true : false,
616-
ranges: zip(this.currentStats.mins, this.currentStats.maxs),
617-
round: true
618-
});
619-
} catch (error) {
620-
console.error(error);
621-
}
610+
}
611+
if (this._dynamic) {
612+
try {
613+
const rawToRgbFn = (rawToRgb as any).default || rawToRgb;
614+
this.rawToRgb = rawToRgbFn({
615+
format: "string",
616+
flip: this.currentStats.mins.length === 1 ? true : false,
617+
ranges: zip(this.currentStats.mins, this.currentStats.maxs),
618+
round: true
619+
});
620+
} catch (error) {
621+
console.error(error);
622622
}
623623
}
624624
}

0 commit comments

Comments
 (0)