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

Commit

Permalink
FIX: ODataV4 If-Match header not added to header with undefined value
Browse files Browse the repository at this point in the history
  • Loading branch information
borzav committed Feb 25, 2016
1 parent 16bd92f commit 9f05a5f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Types/StorageProviders/oData/oDataProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,10 +867,12 @@ $C('$data.storageProviders.oData.oDataProvider', $data.StorageProviderBase, null
var property = item.data.getType().memberDefinitions.getPublicMappedProperties().filter(function (memDef) { return memDef.concurrencyMode === $data.ConcurrencyMode.Fixed });
if (property && property[0]) {
var headerValue = (typeof value !== "undefined") ? value : item.data[property[0].name];
if(request instanceof activities.RequestBuilder){
request.add(new activities.SetHeaderProperty('If-Match', headerValue))
} else {
request.headers['If-Match'] = headerValue;
if(typeof headerValue !== "undefined"){
if(request instanceof activities.RequestBuilder){
request.add(new activities.SetHeaderProperty('If-Match', headerValue))
} else {
request.headers['If-Match'] = headerValue;
}
}
}
},
Expand Down

0 comments on commit 9f05a5f

Please sign in to comment.