Skip to content
This repository was archived by the owner on Apr 11, 2023. It is now read-only.

Commit 9f05a5f

Browse files
committed
FIX: ODataV4 If-Match header not added to header with undefined value
1 parent 16bd92f commit 9f05a5f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Types/StorageProviders/oData/oDataProvider.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -867,10 +867,12 @@ $C('$data.storageProviders.oData.oDataProvider', $data.StorageProviderBase, null
867867
var property = item.data.getType().memberDefinitions.getPublicMappedProperties().filter(function (memDef) { return memDef.concurrencyMode === $data.ConcurrencyMode.Fixed });
868868
if (property && property[0]) {
869869
var headerValue = (typeof value !== "undefined") ? value : item.data[property[0].name];
870-
if(request instanceof activities.RequestBuilder){
871-
request.add(new activities.SetHeaderProperty('If-Match', headerValue))
872-
} else {
873-
request.headers['If-Match'] = headerValue;
870+
if(typeof headerValue !== "undefined"){
871+
if(request instanceof activities.RequestBuilder){
872+
request.add(new activities.SetHeaderProperty('If-Match', headerValue))
873+
} else {
874+
request.headers['If-Match'] = headerValue;
875+
}
874876
}
875877
}
876878
},

0 commit comments

Comments
 (0)