Skip to content

Commit

Permalink
Fix for displaying preview
Browse files Browse the repository at this point in the history
[Issue]: N/A
[Problem]: Previous change causes not adding doctype to HTML which is displayed in preview.
[Solution]: Change order of executed functions in pipe.

Signed-off-by: Wojciech Szczepanski <w.szczepansk@samsung.com>
  • Loading branch information
wszczepanski97 committed Jul 31, 2019
1 parent 7c28602 commit 94b90fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion design-editor/src/panel/preview/preview-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,9 @@ class Preview extends DressElement {
createPreviewDocument(contents, location) {
const relativePathToFile = pathUtils.joinPaths(path.dirname(location), 'temporary-preview.html'),
writeFile = promisify(fs.writeFile),
processPipe = pipe([addDoctypeDeclaration, removeMediaQueryConstraints,
processPipe = pipe([removeMediaQueryConstraints,
this.addHelperCSSLibrary.bind(this),
addDoctypeDeclaration,
this.removeFileReferance.bind(this)]),
parsedContents = processPipe(contents, location);

Expand Down

0 comments on commit 94b90fc

Please sign in to comment.