@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
|
@@ -327,12 +327,18 @@
|
|
|
327
327
|
function penaltyTypeField() {
|
|
328
328
|
return {
|
|
329
329
|
toFront: function (data) {
|
|
330
|
+
if (!data) {
|
|
331
|
+
return null;
|
|
332
|
+
}
|
|
330
333
|
if (typeof data === 'object') {
|
|
331
334
|
return data;
|
|
332
335
|
}
|
|
333
336
|
return HockeyPenaltyTypes.find(function (item) { return item.id === data; });
|
|
334
337
|
},
|
|
335
338
|
toBack: function (data) {
|
|
339
|
+
if (!data) {
|
|
340
|
+
return null;
|
|
341
|
+
}
|
|
336
342
|
if (typeof data === 'object') {
|
|
337
343
|
return data.id;
|
|
338
344
|
}
|