Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
paperdave committed Mar 3, 2023
1 parent 90620ca commit cfa58fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/next-metadata/CHANGELOG.md
@@ -1,5 +1,11 @@
# next-metadata

## 0.1.2

### Patch Changes

- Fix a bug with ExtendMeta, breaking some opengraph meta

## 0.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/next-metadata/package.json
@@ -1,6 +1,6 @@
{
"name": "next-metadata",
"version": "0.1.1",
"version": "0.1.2",
"description": "Port of Next.js' metadata object API to use in other frameworks.",
"keywords": [
"nextjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-metadata/src/render.ts
Expand Up @@ -49,7 +49,7 @@ function ExtendMeta(prefix: string, content: any) {
return MetaProp(prefix, content);
} else {
let str = '';
for (const [prop, value] of content) {
for (const [prop, value] of Object.entries(content)) {
if (value) {
str += MetaProp(
prefix === 'og:image' && prop === 'url' ? 'og:image' : prefix + ':' + prop,
Expand Down

0 comments on commit cfa58fc

Please sign in to comment.