Skip to content

Commit

Permalink
fix(resolver-pixi): using data-type for resolver pixi images
Browse files Browse the repository at this point in the history
  • Loading branch information
Igmat committed Mar 1, 2018
1 parent 61bac7f commit 4f8a270
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/baset-resolver-pixi/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AbstractResolver, utils } from 'baset-core';
import { AbstractResolver, dataTypes, utils } from 'baset-core';
import { NodeVM } from 'baset-vm';
import fs from 'fs';
import path from 'path';
Expand All @@ -17,6 +17,9 @@ export default class PixiResolver extends AbstractResolver {
resolve = async (obj: any, context: NodeVM, sandbox: utils.IDictionary<any>) => {
sandbox.basetResolverPixi__ObjectToRender = obj;

return await context.run(await renderInContextScript, 'PixiResolver.js').renderedResult;
return {
value: await context.run(await renderInContextScript, 'PixiResolver.js').renderedResult,
[dataTypes.image]: 'base64',
};
}
}

0 comments on commit 4f8a270

Please sign in to comment.