Skip to content

Commit 76e9456

Browse files
committed
wip
1 parent 9e9d5c3 commit 76e9456

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

snippets/react-specific.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react";
22

33
export const ReactSpecific = ({ children }) => {
44
const [code, setCode] = useState(
5-
localStorage.getItem("code").replace(/"/g, "") || null,
5+
localStorage.getItem("code")?.replace(/"/g, "") || null,
66
);
77

88
const callback = useCallback((event) => {

snippets/svelte-specific.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react";
22

33
export const SvelteSpecific = ({ children }) => {
44
const [code, setCode] = useState(
5-
localStorage.getItem("code").replace(/"/g, "") || null,
5+
localStorage.getItem("code")?.replace(/"/g, "") || null,
66
);
77

88
const callback = useCallback((event) => {

snippets/svelte4-specific.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react";
22

33
export const Svelte4Specific = ({ children }) => {
44
const [code, setCode] = useState(
5-
localStorage.getItem("code").replace(/"/g, "") || null,
5+
localStorage.getItem("code")?.replace(/"/g, "") || null,
66
);
77

88
const callback = useCallback((event) => {

snippets/svelte5-specific.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react";
22

33
export const Svelte5Specific = ({ children }) => {
44
const [code, setCode] = useState(
5-
localStorage.getItem("code").replace(/"/g, "") || null,
5+
localStorage.getItem("code")?.replace(/"/g, "") || null,
66
);
77

88
const callback = useCallback((event) => {

snippets/vue-specific.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react";
22

33
export const VueSpecific = ({ children }) => {
44
const [code, setCode] = useState(
5-
localStorage.getItem("code").replace(/"/g, "") || null,
5+
localStorage.getItem("code")?.replace(/"/g, "") || null,
66
);
77

88
const callback = useCallback((event) => {

snippets/vue2-specific.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react";
22

33
export const Vue2Specific = ({ children }) => {
44
const [code, setCode] = useState(
5-
localStorage.getItem("code").replace(/"/g, "") || null,
5+
localStorage.getItem("code")?.replace(/"/g, "") || null,
66
);
77

88
const callback = useCallback((event) => {

snippets/vue3-specific.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react";
22

33
export const Vue3Specific = ({ children }) => {
44
const [code, setCode] = useState(
5-
localStorage.getItem("code").replace(/"/g, "") || null,
5+
localStorage.getItem("code")?.replace(/"/g, "") || null,
66
);
77

88
const callback = useCallback((event) => {

0 commit comments

Comments
 (0)