Skip to content

Commit

Permalink
handle read only property error
Browse files Browse the repository at this point in the history
  • Loading branch information
j8seangel committed Apr 22, 2024
1 parent bc58c8e commit 1166be2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { PathLayer, SolidPolygonLayer, TextLayer } from '@deck.gl/layers'
import { GeoBoundingBox } from '@deck.gl/geo-layers'
import { PathStyleExtension } from '@deck.gl/extensions'
import { screen } from 'color-blend'
import { isEqual } from 'lodash'
import { FourwingsFeature, getTimeRangeKey } from '@globalfishingwatch/deck-loaders'
import {
COLOR_HIGHLIGHT_LINE,
Expand Down Expand Up @@ -113,7 +114,11 @@ export class FourwingsHeatmapLayer extends CompositeLayer<FourwingsHeatmapLayerP
})
let chosenValueIndex = 0
let chosenValue: number | undefined
feature.properties.aggregatedValues = aggregatedCellValues
try {
feature.properties.aggregatedValues = aggregatedCellValues
} catch (e: any) {
console.warn(e.message)
}
aggregatedCellValues.forEach((value, index) => {
if (value && (!chosenValue || value > chosenValue)) {
chosenValue = value
Expand Down

0 comments on commit 1166be2

Please sign in to comment.