File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,16 @@ export default class KeywordInput extends CustomSurface {
3636 }
3737
3838 render ( $$ ) {
39- const doc = this . context . doc
39+ const editorSession = this . context . editorSession
40+ const doc = editorSession . getDocument ( )
4041 const model = this . props . model
4142 const values = model . getValue ( )
4243 const isEmpty = values . length === 0
4344 const isSelected = this . state . isSelected
4445 const isExpanded = this . state . isExpanded
45- const label = isEmpty ? this . props . placeholder : values . map ( v => doc . get ( [ v , 'content' ] ) ) . join ( ', ' )
46+ const label = isEmpty ? this . props . placeholder : values . map ( v => {
47+ return doc . get ( [ v , 'content' ] )
48+ } ) . join ( ', ' )
4649
4750 const el = $$ ( 'div' ) . addClass ( 'sc-keyword-input' )
4851 if ( isEmpty ) el . addClass ( 'sm-empty' )
You can’t perform that action at this time.
0 commit comments