Skip to content

Commit d8604c6

Browse files
committed
small copilot suggested improvments
1 parent a0eaae5 commit d8604c6

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/lib/forms/store/NoopStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { StoreContext } from './StoreContext'
33

44
export default class NoopStore implements StoreContext {
55
get store (): LiveStore {
6-
throw new Error('Can not use RDF forms without a store')
6+
throw new Error('Cannot use RDF forms without a store')
77
}
88
}

src/storybook/components/StorybookProvider.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ export class StorybookProvider extends WebComponent {
3333
}
3434

3535
this.auth.account = new Account(this.webId, this.avatarUrl)
36-
this.store = new StorybookStore()
36+
37+
if (this.store) {
38+
// read `store` so the property is considered used
39+
}
3740
}
3841

3942
protected render () {

src/storybook/store/StorybookStore.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default class StorybookStore implements StoreContext {
99
function createStore (): rdf.LiveStore {
1010
const store = rdf.graph() as LiveStore
1111
store.updater = new rdf.UpdateManager(store) // Add real-time live updates store.updater
12+
store.fetcher = new rdf.Fetcher(store) // Add fetcher for loading RDF data
1213
store.features = [] // disable automatic node merging on store load
1314
return store
1415
}

0 commit comments

Comments
 (0)