diff --git a/IPython/html/static/notebook/js/outputarea.js b/IPython/html/static/notebook/js/outputarea.js
index 4275d02..d1d194e 100644
--- a/IPython/html/static/notebook/js/outputarea.js
+++ b/IPython/html/static/notebook/js/outputarea.js
@@ -175,7 +175,7 @@ define([
      *
      **/
     OutputArea.prototype.scroll_if_long = function (lines) {
-        var n = lines | OutputArea.minimum_scroll_threshold;
+        var n = lines || OutputArea.minimum_scroll_threshold;
         if(n <= 0){
             return;
         }