Skip to content

Commit

Permalink
refactor: 不要なref定義を削除する (#1981)
Browse files Browse the repository at this point in the history
* refactor: refを削除しても動いた

* refactor: _特に意味がなさそうなので削除
  • Loading branch information
weweweok authored Apr 9, 2024
1 parent 507f98c commit 020b87d
Showing 1 changed file with 3 additions and 15 deletions.
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

0 comments on commit 020b87d

Please sign in to comment.