Merge branch 'master' into sort-table-names
This commit is contained in:
commit
412cf67e17
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||||
"version": "3.2.22",
|
"version": "3.2.23",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"concurrency": 20,
|
"concurrency": 20,
|
||||||
"command": {
|
"command": {
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
if (!name?.length) {
|
if (!name?.length) {
|
||||||
return "Name is required"
|
return "Name is required"
|
||||||
}
|
}
|
||||||
if (snippets.some(snippet => snippet.name === name)) {
|
if (!snippet?.name && snippets.some(snippet => snippet.name === name)) {
|
||||||
return "That name is already in use"
|
return "That name is already in use"
|
||||||
}
|
}
|
||||||
if (firstCharNumberRegex.test(name)) {
|
if (firstCharNumberRegex.test(name)) {
|
||||||
|
@ -106,11 +106,7 @@
|
||||||
Delete
|
Delete
|
||||||
</Button>
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
<Button
|
<Button cta on:click={saveSnippet} disabled={!code || loading || nameError}>
|
||||||
cta
|
|
||||||
on:click={saveSnippet}
|
|
||||||
disabled={!snippet && (loading || nameError)}
|
|
||||||
>
|
|
||||||
Save
|
Save
|
||||||
</Button>
|
</Button>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
|
|
|
@ -186,7 +186,7 @@
|
||||||
<div class="snippet-popover">
|
<div class="snippet-popover">
|
||||||
{#key hoveredSnippet}
|
{#key hoveredSnippet}
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
value={hoveredSnippet.code.trim()}
|
value={hoveredSnippet.code?.trim()}
|
||||||
mode={EditorModes.JS}
|
mode={EditorModes.JS}
|
||||||
readonly
|
readonly
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue