Skip to content

Commit c7b6950

Browse files
committed
fix(shape): Fix issue with includes method that is not supports by Node yet
1 parent 8488c4a commit c7b6950

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Basic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export default class Shape {
187187
* @returns {Shape}
188188
*/
189189
setAlignX(align = 'none') {
190-
if (!['none', 'left', 'center', 'right'].includes(align)) throw new Error(`Unknown align type: ${align}`);
190+
if (['none', 'left', 'center', 'right'].indexOf(align) === -1) throw new Error(`Unknown align type: ${align}`);
191191
return this.set('alignX', align);
192192
}
193193

@@ -207,7 +207,7 @@ export default class Shape {
207207
* @returns {Shape}
208208
*/
209209
setAlignY(align = 'none') {
210-
if (!['none', 'top', 'middle', 'bottom'].includes(align)) throw new Error(`Unknown align type: ${align}`);
210+
if (['none', 'top', 'middle', 'bottom'].indexOf(align) === -1) throw new Error(`Unknown align type: ${align}`);
211211
return this.set('alignY', align);
212212
}
213213

0 commit comments

Comments
 (0)