mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 07:16:01 +00:00
fixes
This commit is contained in:
@@ -312,6 +312,14 @@ export function safeJsonParse(json, defaultValue?, logError = false) {
|
||||
}
|
||||
}
|
||||
|
||||
export function safeCompileRegExp(regex: string, flags: string) {
|
||||
try {
|
||||
return new RegExp(regex, flags);
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export function shouldOpenMultilineDialog(value) {
|
||||
if (_isString(value)) {
|
||||
if (value.includes('\n')) {
|
||||
|
||||
Reference in New Issue
Block a user