If id is string convert to number

This commit is contained in:
2022-03-04 18:41:41 +01:00
parent dbde8bc00b
commit 5dd3509466

View File

@@ -52,6 +52,7 @@ export default {
},
actions: {
open: ({ commit }, { id, type = "movie" }) => {
if (!isNaN(id)) id = Number(id);
commit("SET_OPEN", { id, type });
updateQueryParams(id, type);
},