Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 不要なref定義を削除する #1981

Merged
merged 2 commits into from
Apr 9, 2024
Merged
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
18 changes: 3 additions & 15 deletions src/components/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ const store = useStore();

const openedEditor = computed(() => store.state.openedEditor);

/**
* 読み込むプロジェクトファイルのパス。
* undefinedのときは何も読み込むべきものがない。
*/
const projectFilePath = ref<string | undefined>(undefined);

// Google Tag Manager
const gtm = useGtm();
watch(
Expand Down Expand Up @@ -75,10 +69,7 @@ onMounted(async () => {
await store.dispatch("INIT_VUEX");

// プロジェクトファイルのパスを取得
const _projectFilePath = urlParams.get("projectFilePath");
if (_projectFilePath != undefined && _projectFilePath !== "") {
projectFilePath.value = _projectFilePath;
}
const projectFilePath = urlParams.get("projectFilePath");

// どちらのエディタを開くか設定
await store.dispatch("SET_OPENED_EDITOR", { editor: "talk" });
Expand Down Expand Up @@ -129,12 +120,9 @@ onMounted(async () => {
});

// プロジェクトファイルが指定されていればロード
if (
typeof projectFilePath.value === "string" &&
projectFilePath.value !== ""
) {
if (typeof projectFilePath === "string" && projectFilePath !== "") {
isProjectFileLoaded.value = await store.dispatch("LOAD_PROJECT_FILE", {
filePath: projectFilePath.value,
filePath: projectFilePath,
});
} else {
isProjectFileLoaded.value = false;
Expand Down
Loading