Skip to content

Commit 03c9c7d

Browse files
Merge branch 'master' into batch
2 parents 7cdf511 + fa66a38 commit 03c9c7d

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ Please check [DynamicsWebApi Wiki](../../wiki/) where you will find documentatio
1010

1111
Libraries for browsers can be found in [dist](/dist/) folder.
1212

13-
Any suggestions are welcome!
13+
If you find this library useful or it saved your time, please feel free to donate to [Paypal](https://paypal.me/alexrogov).
14+
15+
Any suggestions and contributions are welcome!
1416

1517
**Important!** For some reason, npm was not removing `.git` folder from a published package,
1618
even though [it should have done it by default](https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package), therefore
@@ -145,7 +147,7 @@ function acquireToken(dynamicsWebApiCallback){
145147

146148
//create DynamicsWebApi object
147149
var dynamicsWebApi = new DynamicsWebApi({
148-
webApiUrl: 'https:/myorg.api.crm.dynamics.com/api/data/v9.0/',
150+
webApiUrl: 'https://myorg.api.crm.dynamics.com/api/data/v9.0/',
149151
onTokenRefresh: acquireToken
150152
});
151153

dist/dynamics-web-api-callbacks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ var ErrorHelper = {
295295
if (alternateKeys.length) {
296296
for (var i = 0; i < alternateKeys.length; i++){
297297
alternateKeys[i] = alternateKeys[i].trim().replace('"', "'");
298-
/^[\w\d\_]+\='[^\'\r\n]+'$/i.exec(alternateKeys[i])[0];
298+
/^[\w\d\_]+\=('[^\'\r\n]+'|\d+)$/i.exec(alternateKeys[i])[0];
299299
}
300300
}
301301

dist/dynamics-web-api-callbacks.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dynamics-web-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ var ErrorHelper = {
295295
if (alternateKeys.length) {
296296
for (var i = 0; i < alternateKeys.length; i++){
297297
alternateKeys[i] = alternateKeys[i].trim().replace('"', "'");
298-
/^[\w\d\_]+\='[^\'\r\n]+'$/i.exec(alternateKeys[i])[0];
298+
/^[\w\d\_]+\=('[^\'\r\n]+'|\d+)$/i.exec(alternateKeys[i])[0];
299299
}
300300
}
301301

dist/dynamics-web-api.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/helpers/ErrorHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ var ErrorHelper = {
143143
if (alternateKeys.length) {
144144
for (var i = 0; i < alternateKeys.length; i++){
145145
alternateKeys[i] = alternateKeys[i].trim().replace('"', "'");
146-
/^[\w\d\_]+\='[^\'\r\n]+'$/i.exec(alternateKeys[i])[0];
146+
/^[\w\d\_]+\=('[^\'\r\n]+'|\d+)$/i.exec(alternateKeys[i])[0];
147147
}
148148
}
149149

tests/common-tests.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,12 @@ describe("ErrorHelper.keyParameterCheck", function () {
13971397
expect(result).to.eq("altKey='value',anotherKey='value2'");
13981398
});
13991399

1400+
it("checks correct alternate keys string and integer", function () {
1401+
var alternateKey = "altKey=123456,anotherKey='value2'";
1402+
var result = ErrorHelper.keyParameterCheck(alternateKey);
1403+
expect(result).to.eq("altKey=123456,anotherKey='value2'");
1404+
});
1405+
14001406
it("throws an error when alternate key is incorrect", function () {
14011407
expect(function () {
14021408
var alternateKey = "altKey='value, anotherKey='value2'";

0 commit comments

Comments
 (0)