1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-07 06:25:21 +02:00

fix: replace exiting loop to throwing exception

This commit is contained in:
Y-k-Y 2022-06-22 22:57:06 +09:00
parent 73f10cc811
commit b445414098

View file

@ -2,6 +2,7 @@ import Page, { PageData } from '../models/page';
import Alias from '../models/alias';
import PagesOrder from './pagesOrder';
import PageOrder from '../models/pageOrder';
import HttpException from "../exceptions/httpException";
type PageDataFields = keyof PageData;
@ -135,7 +136,7 @@ class Pages {
*/
while (orphanPageOrder.length > 0) {
if (count >= 1000) {
break;
throw new HttpException(500, `Page cannot be processed`);
}
orphanPageOrder.forEach((orphanOrder, idx) => {