Skip to content

Commit 1f5c4a2

Browse files
committed
DFL-2502 Address review issues.
1 parent d40a045 commit 1f5c4a2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ecma-debugger/js-source-view.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ cls.JsSourceView = function(id, name, container_class)
988988

989989
this._get_lines_from_delta = function(delta, unit)
990990
{
991-
var lines;
991+
var lines = 0;
992992
if (unit == UNIT_LINES)
993993
lines = delta;
994994
else if (unit == UNIT_PIXELS)
@@ -1006,15 +1006,13 @@ cls.JsSourceView = function(id, name, container_class)
10061006
{
10071007
// Enough delta to scroll at least one line, round delta
10081008
// to full integer towards 0 and store remainder for later.
1009-
lines = delta >= 1 ? Math.floor(delta) : Math.ceil(delta);
1009+
lines = delta > 0 ? Math.floor(delta) : Math.ceil(delta);
10101010
_accumulated_delta = delta % 1;
10111011
}
10121012
else
10131013
// Not enough delta accumulated to scroll.
10141014
lines = 0;
10151015
}
1016-
else
1017-
lines = 0;
10181016

10191017
return lines;
10201018
}

0 commit comments

Comments
 (0)