File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -67,13 +67,24 @@ class Sample {
6767 }
6868
6969 async getToc ( ) {
70- let id = DataObject . resurrect ( this . sample . $id ) . join ( ' ' ) ;
70+ // sample_toc is now expected to be based on last modification date
71+ let id = DataObject . resurrect ( this . sample . modificationDate ) ;
7172 let result = await this . roc . query ( 'sample_toc' , {
7273 key : id ,
7374 filter : ( entry ) => {
7475 return entry . id === this . uuid ;
7576 } ,
7677 } ) ;
78+
79+ if ( result . length === 0 ) {
80+ id = DataObject . resurrect ( this . sample . $id ) . join ( ' ' ) ;
81+ result = await this . roc . query ( 'sample_toc' , {
82+ key : id ,
83+ filter : ( entry ) => {
84+ return entry . id === this . uuid ;
85+ } ,
86+ } ) ;
87+ }
7788 if ( result . length === 0 ) {
7889 result = await this . roc . query ( 'sample_toc' , {
7990 key : id . trimEnd ( ' ' ) ,
You can’t perform that action at this time.
0 commit comments