Skip to content

Commit 621db24

Browse files
fix: read default locale
1 parent 22241a9 commit 621db24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "strapi-plugin-navigation",
3-
"version": "3.2.6-beta.1",
3+
"version": "3.2.6-beta.2",
44
"description": "Strapi - Navigation plugin",
55
"strapi": {
66
"name": "navigation",

server/src/utils/migration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getNavigationRepository } from "../repositories";
33

44
export const removeNavigationsWithoutDefaultLocale = async (context: { strapi: Core.Strapi }) => {
55
const allNavigations = await getNavigationRepository(context).find({ locale: '*', limit: Number.MAX_SAFE_INTEGER });
6-
const defaultLocale = context.strapi.plugin('i18n').service('locales').getDefaultLocale().code;
6+
const defaultLocale = await context.strapi.plugin('i18n').service('locales').getDefaultLocale();
77
await Promise.all(allNavigations.map(async (navigation) => {
88
const root = allNavigations.find(({ documentId, locale }) => documentId === navigation.documentId && locale === defaultLocale);
99
if (!root) {

0 commit comments

Comments
 (0)