Skip to content

Commit 7631d38

Browse files
don't cut alternate key if it contains a guid value; fixes #66
1 parent 36a2888 commit 7631d38

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ If you feel that this project saved your time and you would like to support it,
1414

1515
Please check [suggestions and contributions](#contributions) section to learn more on how you can help to improve this project.
1616

17+
**DynamicsWebApi v2 is coming!**
18+
1719
**Important!** For some reason, npm was not removing `.git` folder from a published package,
1820
even though [it should have done it by default](https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package), therefore
1921
`npm update dynamics-web-api` was not working properly. If you see an error during an update of the package,

lib/helpers/ErrorHelper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ var ErrorHelper = {
132132
ErrorHelper.stringParameterCheck(parameter, functionName, parameterName);
133133

134134
//check if the param is a guid
135-
var match = /[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}/i.exec(parameter);
135+
var match = /^{?([0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12})}?$/i.exec(parameter);
136136
if (match) {
137-
return match[0];
137+
return match[1];
138138
}
139139

140140
//check the alternate key

types/dynamics-web-api-callbacks.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for dynamics-web-api-callbacks v1.6.2
1+
// Type definitions for dynamics-web-api-callbacks v1.6.3
22
// Project: https://github.com/AleksandrRogov/DynamicsWebApi
33
// Definitions by: Aleksandr Rogov https://github.com/AleksandrRogov/
44

types/dynamics-web-api.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for dynamics-web-api v1.6.2
1+
// Type definitions for dynamics-web-api v1.6.3
22
// Project: https://github.com/AleksandrRogov/DynamicsWebApi/
33
// Definitions by: Aleksandr Rogov https://github.com/AleksandrRogov/
44

0 commit comments

Comments
 (0)