From 5c5ff59de147360d10c8d751883233dae2e994d7 Mon Sep 17 00:00:00 2001 From: Robert DeLuca Date: Fri, 13 Mar 2020 17:32:03 -0500 Subject: [PATCH] Ensure proper order --- src/percy-agent-client/dom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/percy-agent-client/dom.ts b/src/percy-agent-client/dom.ts index 5e1ea6c3..21ab9769 100644 --- a/src/percy-agent-client/dom.ts +++ b/src/percy-agent-client/dom.ts @@ -252,7 +252,7 @@ class DOM { $image.src = $canvas.toDataURL() $image.setAttribute('data-percy-canvas-serialized', 'true') - $clonedCanvas.parentElement.appendChild($image) + $clonedCanvas.parentElement.insertBefore($image, $clonedCanvas) $clonedCanvas.remove() } }