Skip to content

Commit

Permalink
refactor(normalize): adjust previewParam handling for koda
Browse files Browse the repository at this point in the history
chore(tests): update koda file name in generative tests to match new structure
  • Loading branch information
preschian committed Jul 3, 2024
1 parent 17fab42 commit fb33db3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hyperdata/src/normalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function generativeFrom(meta: any): GenArt | undefined {
const hash = meta.previewHash || meta.iterationHash
const previewParam =
meta.previewParam ||
(meta.external_url?.includes('koda') && 'koda') ||
(meta.external_url?.includes('koda') && 'hash') ||
'fxhash'
const capture = meta.capture
const settings = meta.settings
Expand Down
2 changes: 1 addition & 1 deletion hyperdata/tests/generative.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest'
import { FXHashMetadata, GenArt, generativeFrom } from '../src'
import fxhash from './examples/fxhash.json'
import koda from './examples/koda-art-generative.json'
import koda from './examples/koda-generative-collection.json'

describe('generativeFrom', () => {
it(`should parse FXhash metadata to Content correctly`, () => {
Expand Down

0 comments on commit fb33db3

Please sign in to comment.