jshint compliance
This commit is contained in:
@@ -52,7 +52,7 @@ define(function () {
|
||||
*/
|
||||
var applyChange = function(ctx, oldval, newval) {
|
||||
// Strings are immutable and have reference equality. I think this test is O(1), so its worth doing.
|
||||
if (oldval === newval) return;
|
||||
if (oldval === newval) { return; }
|
||||
|
||||
var commonStart = 0;
|
||||
while (oldval.charAt(commonStart) === newval.charAt(commonStart)) {
|
||||
@@ -130,7 +130,7 @@ var attachTextarea = function(elem, ctx, cmElem) {
|
||||
content = elem.value; // Not done on one line so the browser can do newline conversion.
|
||||
|
||||
if(!cmElem) {
|
||||
if (elem.scrollTop !== scrollTop) elem.scrollTop = scrollTop;
|
||||
if (elem.scrollTop !== scrollTop) { elem.scrollTop = scrollTop; }
|
||||
|
||||
// Setting the selection moves the cursor. We'll just have to let your
|
||||
// cursor drift if the element isn't active, though usually users don't
|
||||
|
||||
Reference in New Issue
Block a user