Skip to content

Commit 4def09d

Browse files
committed
minor changes as per review
1 parent be7f64b commit 4def09d

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/halHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function isEntityReference (object: keyValueObject): object is Link {
3131
}
3232

3333
/**
34-
* A templated link in the Vuex store looks like this: { href: '/some/uri{/something}', templated: true }
34+
* A virtual link in the Vuex store looks like this: { href: '/some/uri{/something}', virtual: true }
3535
* @param object to be examined
3636
* @returns boolean true if the object looks like a templated link, false otherwise
3737
*/

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function HalJsonVuex (store: Store<Record<string, State>>, axios: AxiosInstance,
105105
* dummy is returned, which will be replaced with the true data through Vue's reactivity
106106
* system as soon as the API request finishes.
107107
*/
108-
function get (uriOrEntity: string | ResourceInterface): ResourceInterface {
108+
function get (uriOrEntity: string | ResourceInterface = ''): ResourceInterface {
109109
const uri = normalizeEntityUri(uriOrEntity, axios.defaults.baseURL)
110110

111111
if (uri === null) {

src/storeModule.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ export const mutations: MutationTree<State> = {
2525
Object.keys(data).forEach(uri => {
2626
Vue.set(state, uri, data[uri])
2727

28-
if (state[uri]._meta === undefined) {
29-
Vue.set(state[uri], '_meta', {})
30-
}
31-
3228
Vue.set(state[uri]._meta, 'loading', false)
3329
Vue.set(state[uri]._meta, 'reloading', false)
3430
})

0 commit comments

Comments
 (0)