Skip to content

Commit bc31151

Browse files
authored
Add a null check for session tree in getValue (#233)
* add null check * add no-sandbox
1 parent 6fc077a commit bc31151

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Gruntfile.coffee

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ module.exports = (grunt) ->
5656
viewportSize:
5757
width: 1000
5858
height: 1000
59+
puppeteer:
60+
args: ['--no-sandbox']
5961
all:
6062
urls:
6163
(for x in grunt.file.expand('test/*.html')

src/controller.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4197,7 +4197,7 @@ Editor::addEmptyLine = (str) ->
41974197
return str + '\n'
41984198

41994199
Editor::getValue = ->
4200-
if @session?.currentlyUsingBlocks
4200+
if @session?.currentlyUsingBlocks and @session?.tree
42014201
return @addEmptyLine @session.tree.stringify({
42024202
preserveEmpty: @session.options.preserveEmpty
42034203
})

0 commit comments

Comments
 (0)