diff --git a/cypress/platform/rerender.html b/cypress/platform/rerender.html
index 9b6cb130e..61c6891f7 100644
--- a/cypress/platform/rerender.html
+++ b/cypress/platform/rerender.html
@@ -17,11 +17,12 @@
rerender('XMas');
function rerender(text) {
- var graphText = `graph TD
+ const graphText = `graph TD
A[${text}] -->|Get money| B(Go shopping)`;
- var graph = mermaid.mermaidAPI.render('id', graphText);
- console.log('\x1b[35m%s\x1b[0m', '>> graph', graph);
- document.getElementById('graph').innerHTML = graph;
+ mermaid.mermaidAPI.render('id', graphText).then((svg) => {
+ console.log('\x1b[35m%s\x1b[0m', '>> graph', svg);
+ document.getElementById('graph').innerHTML = svg;
+ });
}