fix: rewrite preview urls from current storage fallback
This commit is contained in:
parent
38cc12da8e
commit
5ccd392b75
@ -133,8 +133,13 @@ async function main() {
|
||||
visitSteps(nextConfig.steps || [], (option) => {
|
||||
summary.total += 1;
|
||||
const currentPreview = normalizeUrl(option.previewImageUrl);
|
||||
const source = normalizeUrl(option.previewImageSourceUrl) || currentPreview;
|
||||
const optimized = buildOptimizedPreviewUrl(source);
|
||||
const preferredSource = normalizeUrl(option.previewImageSourceUrl);
|
||||
const source = preferredSource || currentPreview;
|
||||
const optimized =
|
||||
buildOptimizedPreviewUrl(source) ||
|
||||
(preferredSource && currentPreview !== preferredSource
|
||||
? buildOptimizedPreviewUrl(currentPreview)
|
||||
: null);
|
||||
if (!currentPreview || !source) {
|
||||
summary.skipped += 1;
|
||||
return;
|
||||
@ -188,4 +193,3 @@ main().catch((error) => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user