Skip to content

Commit

Permalink
test: πŸ’ fix renderer test
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Oct 29, 2019
1 parent 3c37389 commit 99a07e0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ export class ExpressionRenderHandler {
return;
}

const renderer = getRenderersRegistry().get(data.as);
if (!renderer) {
if (!getRenderersRegistry().get(data.as)) {
this.renderSubject.next({
type: 'error',
error: { message: `invalid renderer id '${data.as}'` },
Expand All @@ -104,7 +103,9 @@ export class ExpressionRenderHandler {

try {
// Rendering is asynchronous, completed by handlers.done()
renderer.render(this.element, data.value, { ...this.handlers, ...extraHandlers });
getRenderersRegistry()
.get(data.as)!
.render(this.element, data.value, { ...this.handlers, ...extraHandlers });
} catch (e) {
this.renderSubject.next({
type: 'error',
Expand Down

0 comments on commit 99a07e0

Please sign in to comment.