mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-05-26 01:19:28 +02:00
Filter out current variable from autocomplete and show sub environment variables in base environment autocomplete
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { generateId } from '../../lib/generateId';
|
||||
import type { Pair, PairWithId } from './PairEditor';
|
||||
|
||||
export function ensurePairId(p: Pair): PairWithId {
|
||||
if (typeof p.id === 'string') {
|
||||
return p as PairWithId;
|
||||
} else {
|
||||
return { ...p, id: p.id ?? generateId() };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user