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