diff --git a/lib/edit/offlineFeaturesManager.js b/lib/edit/offlineFeaturesManager.js index 4e248be..3b32eb6 100644 --- a/lib/edit/offlineFeaturesManager.js +++ b/lib/edit/offlineFeaturesManager.js @@ -784,6 +784,11 @@ define([ featureCollections: featureCollectionsArray }; + // THIS IS A HACK. + // There is a bug in JS API 3.11+ when you create a feature layer from a featureCollectionObject + // the hasAttachments property does not get properly repopulated. + layer.hasAttachments = featureCollection.featureLayerCollection.layerDefinition.hasAttachments; + // If the featureCollectionsObject already exists if(success){ var count = 0; @@ -798,7 +803,7 @@ define([ // If we have a new feature layer then add it to the featureCollections array if(count === 0) { - result.featureCollections.push(featureCollectionsArray); + result.featureCollections.push(featureCollection); } } // If it does not exist then we need to add a featureCollectionsObject