Skip to content

Commit d5f8c34

Browse files
committed
bugfixes
1 parent 43ffef7 commit d5f8c34

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/_includes/components/codepens/identify-spec.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
// Regular expression to check for email
4141
var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
42-
if (!emailRegex.test(name)) {
42+
if (!emailRegex.test(email)) {
4343
const emailError = document.getElementById("email-error");
4444
emailError.style.display = "block";
4545
const emailField = document.getElementById("email");
@@ -108,8 +108,6 @@
108108
}
109109

110110
// If no errors, submit the form
111-
return true;
112-
113111
var output = `{
114112
"anonymousId": "507f191e810c19729de860ea",
115113
"channel": "browser",
@@ -142,10 +140,13 @@
142140
"type": "identify",
143141
"userId": "97980cfea0067",
144142
"version": "1.1"
145-
}`
146-
output_container.innerHTML = output
147-
Prism.highlightElement(output_container)
148-
}
143+
}`;
144+
145+
var output_container = document.getElementById("output_container");
146+
output_container.innerHTML = output;
147+
Prism.highlightElement(output_container);
148+
return true;
149+
}
149150

150151
</script>
151152
<script>

src/_sass/components/_sample-form.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
.sample-form {
2727
display: grid;
2828
grid-template-columns: 50px 1fr;
29-
grid-gap: 16px;
29+
grid-gap: 6px;
3030
margin-top: 6px;
3131
align-items: center;
3232

0 commit comments

Comments
 (0)