diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js
index 1ab322c..176dd77 100644
--- a/IPython/html/static/notebook/js/notebook.js
+++ b/IPython/html/static/notebook/js/notebook.js
@@ -1073,7 +1073,7 @@ define([
* @param {Number} [level] A heading level (e.g., 1 becomes <h1>)
*/
Notebook.prototype.to_heading = function (index, level) {
- level = level || 1;
+ var level = level || 1;
var i = this.index_or_selected(index);
if (this.is_valid_cell_index(i)) {
var source_element = this.get_cell_element(i);