From 64713254f605ee2f18c0bf7cd0c99737cb6501b1 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 14 Oct 2018 13:12:05 -0400 Subject: [PATCH] move require out of function (not really needed in a browser environment) --- embark-ui/src/utils/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/embark-ui/src/utils/utils.js b/embark-ui/src/utils/utils.js index 4e71c95f..e70aeb56 100644 --- a/embark-ui/src/utils/utils.js +++ b/embark-ui/src/utils/utils.js @@ -1,3 +1,5 @@ +const Convert = require('ansi-to-html'); + export function last(array) { return array && array.length ? array[array.length - 1] : undefined; } @@ -14,7 +16,6 @@ export function hashCode(str) { } export function ansiToHtml(text) { - const Convert = require('ansi-to-html'); const convert = new Convert(); return convert.toHtml(text.replace(/\n/g,'
')) }