Skip to content

Commit

Permalink
Use faster comparision
Browse files Browse the repository at this point in the history
  • Loading branch information
basecode committed May 12, 2013
1 parent 41899bb commit 2b75b42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runner/text.js
Expand Up @@ -82,7 +82,7 @@ define([
return this._textAlign;
}
function setTextAlign(textAlign) {
if (/^(left|center|right)$/.test(textAlign)) {
if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') {
this._textAlign = textAlign;
}
}
Expand Down

0 comments on commit 2b75b42

Please sign in to comment.