Skip to content

Commit

Permalink
Merge pull request #344 from gautamsi/fix/sortOrder
Browse files Browse the repository at this point in the history
fix sort order enum
  • Loading branch information
gautamsi authored Mar 12, 2020
2 parents e841869 + 6fb4801 commit 478589e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 30 deletions.
38 changes: 15 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ews-javascript-api",
"version": "0.10.0",
"version": "0.10.1",
"description": "EWS Managed api in JavaScript",
"main": "js/ExchangeWebService.js",
"scripts": {
Expand Down
14 changes: 9 additions & 5 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,14 @@ function copyFiles() {
function copyPackageJson() {
return new Promise(async resolve => {
const file = 'package.json'
const obj = await readFile(file).catch(error => console.error(error));
delete obj.devDependencies;
delete obj.scripts;
await writeFile(`${outputDir}/package.json`, obj, { spaces: 4, EOL: os.EOL }).catch(error => console.error(error));
resolve();
try {
const obj = await readFile(file);
delete obj.devDependencies;
delete obj.scripts;
await writeFile(`${outputDir}/package.json`, obj, { spaces: 4, EOL: os.EOL });
resolve();
} catch (error) {
console.error(error);
}
});
}
2 changes: 1 addition & 1 deletion src/js/Search/OrderByCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class OrderByCollection implements IEnumerable<PropertyDefinitionSortDire
for (var keyValuePair of this.propDefSortOrderPairList) {
writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.FieldOrder);

writer.WriteAttributeValue(XmlAttributeNames.Order, keyValuePair.value);
writer.WriteAttributeValue(XmlAttributeNames.Order, SortDirection[keyValuePair.value]);
keyValuePair.key.WriteToXml(writer);

writer.WriteEndElement(); // FieldOrder
Expand Down

0 comments on commit 478589e

Please sign in to comment.