Skip to content

Commit e07203a

Browse files
fixes #7 - Mismatched Anonymous Define webpack + require.js
1 parent 0197a7d commit e07203a

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

lib/dynamics-web-api-callbacks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,8 +1049,8 @@ function DynamicsWebApi(config) {
10491049

10501050
var header = {};
10511051

1052-
if (impersonateUserId != null) {
1053-
header["MSCRMCallerID"] = ErrorHelper.guidParameterCheck(impersonateUserId, "DynamicsWebApi.associate", "impersonateUserId");
1052+
if (!impersonateUserId) {
1053+
header["MSCRMCallerID"] = ErrorHelper.guidParameterCheck(impersonateUserId, "DynamicsWebApi.executionFunction", "impersonateUserId");
10541054
}
10551055

10561056
var onSuccess = function (response) {

lib/dynamics-web-api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,8 @@ function DynamicsWebApi(config) {
941941

942942
var header = {};
943943

944-
if (impersonateUserId != null) {
945-
header["MSCRMCallerID"] = ErrorHelper.guidParameterCheck(impersonateUserId, "DynamicsWebApi.associate", "impersonateUserId");
944+
if (!impersonateUserId) {
945+
header["MSCRMCallerID"] = ErrorHelper.guidParameterCheck(impersonateUserId, "DynamicsWebApi.executeFunction", "impersonateUserId");
946946
}
947947

948948
return _sendRequest("GET", url, null, header).then(function (response) {

webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ var configs = [];
3333
path: path.resolve(__dirname, 'dist'),
3434
filename: name,
3535
library: outputLibrary,
36-
libraryTarget: "umd"
36+
libraryTarget: "umd",
37+
umdNamedDefine: true
3738
},
3839
plugins: plugins,
3940
module: {

0 commit comments

Comments
 (0)