Skip to content

Commit

Permalink
fix typo and duplicate line
Browse files Browse the repository at this point in the history
  • Loading branch information
DD Liu committed Jun 15, 2017
1 parent a15ba05 commit 082bb1f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,13 @@ Blockly.Field.prototype.render_ = function() {
};

/**
* Updates thw width of the field. This calls getCachedWidth which won't cache
* Updates the width of the field. This calls getCachedWidth which won't cache
* the approximated width on IE/Edge when `getComputedTextLength` fails. Once
* it eventually does succeed, the result will be cached.
**/
Blockly.Field.prototype.updateWidth = function() {
var width = Blockly.Field.getCachedWidth(this.textElement_);
// Calculate width of field
width = Blockly.Field.getCachedWidth(this.textElement_);
var width = Blockly.Field.getCachedWidth(this.textElement_);

// Add padding to left and right of text.
if (this.EDITABLE) {
Expand Down

0 comments on commit 082bb1f

Please sign in to comment.