diff --git a/packages/source/src/source.ts b/packages/source/src/source.ts index ba40800f55..e5ae7681f6 100644 --- a/packages/source/src/source.ts +++ b/packages/source/src/source.ts @@ -128,13 +128,14 @@ export default class Source extends EventEmitter { id < this.originData.features.length ? this.originData.features[id] : 'null'; + const newFeature = cloneDeep(feature); if (this.transforms.length !== 0) { const item = this.data.dataArray.find((dataItem: IParseDataItem) => { return dataItem._id === id; }); - feature.properties = item; + newFeature.properties = item; } - return feature; + return newFeature; } else { return id < this.data.dataArray.length ? this.data.dataArray[id] : 'null'; }