File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,19 @@ export default {
104
104
}
105
105
},
106
106
methods: {
107
+ /**
108
+ * Resolves fetching an image file from the file system.
109
+ *
110
+ * @param {String} path - the path to the image
111
+ * @return {Object} - the image object from the require call
112
+ */
107
113
resolveImage (path ) {
108
- return require (' ../assets/images/cards/' + path);
114
+ try {
115
+ return require (` ../assets/images/cards/${ path} ` );
116
+ } catch (err) {
117
+ console .log (err);
118
+ return require (` ../assets/images/cards/default.png` );
119
+ }
109
120
},
110
121
/**
111
122
* Adjusts the size of the font to be displayed on a CardModel
@@ -125,6 +136,8 @@ export default {
125
136
baselineEm = isAllCaps ? 0.7 : 0.8 ;
126
137
} else if (length >= 18 ) {
127
138
baselineEm = isAllCaps ? 0.9 : 1.0 ;
139
+ } else if (length >= 15 && isAllCaps) {
140
+ baselineEm = 0.9 ;
128
141
}
129
142
return baselineEm;
130
143
}
You can’t perform that action at this time.
0 commit comments