style
This commit is contained in:
@@ -62,14 +62,14 @@ const DEFAULT_DATA: Record<string, any> = {
|
||||
|
||||
export function getDefaultDataForType(type: string, newId?: string): any {
|
||||
const base = { ...DEFAULT_DATA[type] }
|
||||
if (type === 'config' && newId) base.title = `config-${newId}`
|
||||
if (type === 'config' && newId) base.title = `${newId}`
|
||||
return base
|
||||
}
|
||||
|
||||
/** Data for Reset action: clears code completely for config/function; same as default for others */
|
||||
export function getResetDataForType(type: string, nodeId?: string): any {
|
||||
if (type === 'config') {
|
||||
return { plantuml: '@startuml\n\n@enduml\n', title: nodeId ? `config-${nodeId}` : '' }
|
||||
return { plantuml: '@startuml\n\n@enduml\n', title: nodeId ? `${nodeId}` : '' }
|
||||
}
|
||||
if (type === 'function') {
|
||||
return { body: '' }
|
||||
|
||||
Reference in New Issue
Block a user