Skip to content

Commit 26b32c9

Browse files
authored
Merge branch 'develop' into feature/setHideDefaultValueField
2 parents 41b83f0 + bdf14d7 commit 26b32c9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/js/qmHelpers.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,8 +1402,10 @@ var qm = {
14021402
return a;
14031403
},
14041404
removeDuplicatesByProperty: function(myArr, prop) {
1405-
return myArr.filter((obj, pos, arr) => {
1406-
return arr.map(mapObj => mapObj[prop]).indexOf(obj[prop]) === pos;
1405+
return myArr.filter(function(obj, pos, arr) {
1406+
return arr.map(function(mapObj){
1407+
return mapObj[prop]
1408+
}).indexOf(obj[prop]) === pos;
14071409
});
14081410
},
14091411
removeDuplicatesById: function(arr, type) {
@@ -8690,6 +8692,10 @@ var qm = {
86908692
},
86918693
toast: {
86928694
errorAlert: function(errorMessage, callback){
8695+
if(typeof Swal === "undefined"){
8696+
console.error("Swal not defined to show errorAlert for: "+errorMessage)
8697+
return;
8698+
}
86938699
var Toast = Swal.mixin({
86948700
toast: true,
86958701
icon: "error",

0 commit comments

Comments
 (0)