Skip to content

Commit

Permalink
fix: only trigger run if cell type == file
Browse files Browse the repository at this point in the history
  • Loading branch information
ssmirr committed Dec 5, 2020
1 parent 6895a7c commit 08c3931
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions public/js/notebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ $(document).ready(function()
$('[data-docable="true"]').each(function (i, e) { hljs.highlightBlock(e) });

// triggering file cell play-btn if content is modified
let cellId = $(this).attr('id');
if (isDirty[cellId]) {
$(this).siblings('.play-btn').trigger('click');
isDirty[cellId] = false;
if ($(this).data('type') == 'file') {
let cellId = $(this).attr('id');
if (isDirty[cellId]) {
$(this).siblings('.play-btn').trigger('click');
isDirty[cellId] = false;
}
}
})

Expand Down

0 comments on commit 08c3931

Please sign in to comment.