diff --git a/examples/webgl-points-layer.js b/examples/webgl-points-layer.js
index <HASH>..<HASH> 100644
--- a/examples/webgl-points-layer.js
+++ b/examples/webgl-points-layer.js
@@ -81,13 +81,12 @@ function setStyleStatus(valid) {
 const editor = document.getElementById('style-editor');
 editor.addEventListener('input', function() {
   const textStyle = editor.value;
-  if (JSON.stringify(JSON.parse(textStyle)) === JSON.stringify(literalStyle)) {
-    return;
-  }
-
   try {
-    literalStyle = JSON.parse(textStyle);
-    refreshLayer();
+    const newLiteralStyle = JSON.parse(textStyle);
+    if (JSON.stringify(newLiteralStyle) !== JSON.stringify(literalStyle)) {
+      literalStyle = newLiteralStyle;
+      refreshLayer();
+    }
     setStyleStatus(true);
   } catch (e) {
     setStyleStatus(false);
Guard against JSON.parse errors.

Also show successful style parse status after a style error was corrected
but it is the same style as previously.