Skip to content

Commit e5f0d41

Browse files
committed
Tiny code tweaks to DocView.
Signed-off-by: Grant Skinner <[email protected]>
1 parent 55d6936 commit e5f0d41

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

js/views/DocView.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
SOFTWARE.
2323
*/
2424
(function() {
25+
2526
var DocView = function(element) {
2627
this.initialize(element);
2728
};
@@ -178,7 +179,7 @@ SOFTWARE.
178179
this.setText(content);
179180

180181
if (substitution) {
181-
this.setSubstitution(substitution)
182+
this.setSubstitution(substitution);
182183
this.showSubstitution();
183184
} else {
184185
this.showSubstitution(false);
@@ -210,7 +211,7 @@ SOFTWARE.
210211

211212
p.setFlags = function(flags) {
212213
flags = this.validateFlags(flags);
213-
var expCM = this.expressionCM
214+
var expCM = this.expressionCM;
214215
var str = expCM.getValue();
215216
var index = str.lastIndexOf("/");
216217
expCM.replaceRange(flags, {line:0, ch:index+1}, {line:0, ch:str.length}); // this doesn't work if readOnly is false.
@@ -342,7 +343,7 @@ SOFTWARE.
342343
};
343344

344345
p.undo = function() {
345-
if (this.historyIndex == 0) { return; }
346+
if (this.historyIndex === 0) { return; }
346347
this.history[--this.historyIndex].undo();
347348
};
348349

@@ -439,7 +440,7 @@ SOFTWARE.
439440

440441
this.substHighlighter.draw(token);
441442
this.substHover.token = token;
442-
if (!this.error && this.substLexer.errors.length == 0) {
443+
if (!this.error && this.substLexer.errors.length === 0) {
443444
try { str = eval('"'+str.replace(/"/g,'\\"')+'"'); } catch (e) {
444445
console.error("UNCAUGHT js string error", e);
445446
}

0 commit comments

Comments
 (0)