diff --git a/nbdiff/diff.py b/nbdiff/diff.py
index <HASH>..<HASH> 100644
--- a/nbdiff/diff.py
+++ b/nbdiff/diff.py
@@ -33,6 +33,8 @@ def diff(before, after, check_modified=False):
     diff_items : A list of dictionaries containing diff information.
     """
     grid = create_grid(before, after)
+    if len(grid) < 1:
+        return []
     nrows = len(grid[0])
     ncols = len(grid)
     dps = diff_points(grid)
diff --git a/tests/test_diff.py b/tests/test_diff.py
index <HASH>..<HASH> 100644
--- a/tests/test_diff.py
+++ b/tests/test_diff.py
@@ -35,6 +35,11 @@ def test_create_grid():
     assert len([True for col in grid if len(col) == 0]) == 0
 
 
+def test_empty_diff():
+    result = diff([], [])
+    assert len(result) == 0
+
+
 def test_diff_points():
     A = [u'x = [1,3,3]\n', u'z = {1, 2, 3} \n', u'\n', u'z']
     B = [u'x = [1,3,4]\n', u'z = {1, 2, 3} \n', u'\n', u'm']
Fix #<I> - fix diff on empty lists