Skip to content

Commit 02498ce

Browse files
committed
fix: Correctly validate backend_options configuration
1 parent 817ebdd commit 02498ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

state/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func NewConnectedClient(ctx context.Context, backendOpts *plugin.BackendOptions)
5555
// The state client is guaranteed to be non-nil (it defaults to the NoOpClient).
5656
// You must call Close() on the returned Client object.
5757
func NewConnectedClientWithOptions(ctx context.Context, backendOpts *plugin.BackendOptions, connOpts ConnectionOptions, clOpts ClientOptions) (Client, error) {
58-
if backendOpts == nil {
58+
if backendOpts == nil || backendOpts.Connection == "" || backendOpts.TableName == "" {
5959
return &NoOpClient{}, nil
6060
}
6161

0 commit comments

Comments
 (0)