File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ if (location.pathname.endsWith("/")) {
59
59
import ${ preview || page . code . length ? `{${ preview ? "open, " : "" } define} from ` : "" } ${ JSON . stringify (
60
60
resolveImport ( "observablehq:client" )
61
61
) } ;${
62
- files . size || data ?. sql
62
+ files . size
63
63
? `\nimport {registerFile${ data ?. sql ? ", FileAttachment" : "" } } from ${ JSON . stringify (
64
64
resolveImport ( "observablehq:stdlib" )
65
65
) } ;`
Original file line number Diff line number Diff line change @@ -123,8 +123,11 @@ export async function getResolvers(
123
123
124
124
// Add SQL sources.
125
125
if ( page . data . sql ) {
126
- for ( const source of Object . values ( page . data . sql ) ) {
127
- files . add ( String ( source ) ) ;
126
+ for ( const value of Object . values ( page . data . sql ) ) {
127
+ const source = String ( value ) ;
128
+ if ( isAssetPath ( source ) ) {
129
+ files . add ( source ) ;
130
+ }
128
131
}
129
132
}
130
133
You can’t perform that action at this time.
0 commit comments