Handle empty consumptions
MODIFY
src/integration/asset/iothink/IothinkAssetIntegration.ts
src/integration/asset/iothink/IothinkAssetIntegration.ts
@@ -87,7 +87,7 @@ export default class IothinkAssetIntegration extends AssetIntegration<AssetSetti
}
}
if (manualCall) {
- return [consumptions[consumptions.length - 1]];
+ return !Utils.isEmptyArray(consumptions) ? [consumptions[consumptions.length - 1]] : [];
}
return consumptions;
}

Handle empty consumptions