File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 1
- import { values } from 'faunadb' ;
2
-
3
- export type CanvasByOwnerIndexData = [
4
- values . Ref ,
5
- ] ;
1
+ import { TypeOfRef } from './TypeOfRef' ;
6
2
7
3
export type CanvasByOwnerIndex = {
8
- data : CanvasByOwnerIndexData [ ] ;
4
+ data : TypeOfRef [ ] ;
9
5
} ;
Original file line number Diff line number Diff line change @@ -197,8 +197,7 @@ export const findOrCreateUserCanvas = async (user: Partial<UserSession>): Promis
197
197
} else {
198
198
// Return existing canvas reference
199
199
// Although users could have several canvas (projects), they can only create one and thus we only care about the first
200
- const [ canvasRef ] = findUserCanvasResult . data [ 0 ] ;
201
- return canvasRef ;
200
+ return findUserCanvasResult . data [ 0 ] ;
202
201
}
203
202
} catch ( e ) {
204
203
console . error ( `[findOrCreateUserCanvas] Error while fetching canvas:` , e ) ;
You can’t perform that action at this time.
0 commit comments