Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ _Note: Gaps between patch versions are faulty, broken or test releases._

#### :bug: Bug Fix

* Set global `Session` instance in the application state in `core/index`.
It fixes the session events not being emitted in `core/init/dependencies/load-session`.
* Fixed the bug where the event name was set as an event modifier in the `v-attrs` directive `component/directives/attrs`
* Replaced the method calls to `componentCtx.$once` and `componentCtx.$on` with correct event handling based on the isOnceEvent flag in `component/directives/attrs`
* The page description element is now expected to be a meta tag
Expand Down
5 changes: 3 additions & 2 deletions src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import PageMetaData, { AbstractElementProperties } from 'core/page-meta-data';
import ThemeManager, { SystemThemeExtractorWeb } from 'core/theme-manager';

import * as session from 'core/session';
import SessionEngine from 'core/session/engines';

export * as cookies from 'core/cookies';
export * as session from 'core/session';
Expand Down Expand Up @@ -50,7 +49,9 @@ if (SSR) {
appProcessId: Object.fastHash(Math.random()),

cookies: document,
session: session.from(SessionEngine),

// FIXME: refactor core/session https://github.com/V4Fire/Client/issues/1329
session: session.globalSession,

location: getLocationAPI(),
pageMetaData: new PageMetaData(getLocationAPI(), getPageMetaElements()),
Expand Down
2 changes: 1 addition & 1 deletion src/core/session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type { SessionStore } from 'core/session/interface';
export * from 'core/session/class';
export * from 'core/session/interface';

const globalSession = new Session(session);
export const globalSession = new Session(session);

/**
* Returns an API for managing the session of the specified store
Expand Down