Skip to content

Commit

Permalink
fix: external generator print not working without seed
Browse files Browse the repository at this point in the history
  • Loading branch information
BigJk committed Sep 9, 2024
1 parent 8f00631 commit ed2ad84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/js/ui/components/editor/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default (): m.Component<GeneratorEditorProps> => {
),
m(
Flex,
{ gap: 2 },
{ gap: 2, wrap: 'wrap' },
attrs.generator.dataSources.map((s) =>
m(
Label,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/js/ui/views/extern-print/generator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import m from 'mithril';

import Generator from 'js/types/generator';
import Generator, { sanitizeConfig } from 'js/types/generator';
import * as API from 'js/core/api';
import { settings } from 'js/core/store';
import { render } from 'js/core/templating';
Expand Down Expand Up @@ -35,7 +35,7 @@ export default (): m.Component<ExternPrintProps> => {
render(gen.printTemplate, {
sources: gen.dataSources,
images: gen.images,
config: JSON.parse(atob(attrs.config)),
config: sanitizeConfig(gen, JSON.parse(atob(attrs.config))),
settings: settings.value,
})
.then((res) => {
Expand Down

0 comments on commit ed2ad84

Please sign in to comment.