@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.
@@ -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
  }