Skip to content

Commit cacd82a

Browse files
committed
refactor: array.every => array.some.
1 parent f0412fc commit cacd82a

File tree

1 file changed

+1
-1
lines changed
  • website/plugins/docusaurus-plugin-open-graph-image

1 file changed

+1
-1
lines changed

website/plugins/docusaurus-plugin-open-graph-image/layout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { createSVGText } = require("./font");
22

33
function createLayoutLayers(doc, layout, previewFont, textWidthLimit) {
44
/* Check for all layers names exist in doc fields */
5-
if (!layout.every((layer) => doc[layer.name])) {
5+
if (layout.some((layer) => !doc[layer.name])) {
66
console.error(`Wrong template config.`);
77
return;
88
}

0 commit comments

Comments
 (0)