Skip to content

Commit 3a45f6c

Browse files
committed
nullable default substitute
1 parent 72db712 commit 3a45f6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/substituter.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class PostgreSQLFormat {
5555
static String substitute(String fmtString, Map<String, dynamic>? values,
5656
{SQLReplaceIdentifierFunction? replace}) {
5757
final converter = PostgresTextEncoder();
58-
replace ??= (spec, index) => converter.convert(values?[spec.name]);
58+
values ??= const {};
59+
replace ??= (spec, index) => converter.convert(values![spec.name]);
5960

6061
final items = <PostgreSQLFormatToken>[];
6162
PostgreSQLFormatToken? currentPtr;

0 commit comments

Comments
 (0)