Skip to content

Commit 72ff687

Browse files
committed
check values null
1 parent 473f4df commit 72ff687

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/substituter.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ 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+
if (values != null) {
59+
replace ??= (spec, index) => converter.convert(values[spec.name]);
60+
}
5961

6062
final items = <PostgreSQLFormatToken>[];
6163
PostgreSQLFormatToken? currentPtr;

0 commit comments

Comments
 (0)