@mtgame/core 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/mtgame-core.umd.js +6 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/models/util.js +7 -1
- package/esm5/models/util.js +7 -1
- package/fesm2015/mtgame-core.js +6 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +6 -0
- package/fesm5/mtgame-core.js.map +1 -1
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/mtgame-core.js
CHANGED
|
@@ -114,12 +114,18 @@ function enumField(enumClass) {
|
|
|
114
114
|
function penaltyTypeField() {
|
|
115
115
|
return {
|
|
116
116
|
toFront: function (data) {
|
|
117
|
+
if (!data) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
117
120
|
if (typeof data === 'object') {
|
|
118
121
|
return data;
|
|
119
122
|
}
|
|
120
123
|
return HockeyPenaltyTypes.find(function (item) { return item.id === data; });
|
|
121
124
|
},
|
|
122
125
|
toBack: function (data) {
|
|
126
|
+
if (!data) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
123
129
|
if (typeof data === 'object') {
|
|
124
130
|
return data.id;
|
|
125
131
|
}
|