Skip to content

Commit 81cd8f3

Browse files
Callback nil check (#28)
* callback nil check * update * nil check
1 parent 5fdbef9 commit 81cd8f3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

azureappconfiguration/azureappconfiguration.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ func (azappcfg *AzureAppConfiguration) Refresh(ctx context.Context) error {
258258
// Parameters:
259259
// - callback: A function with no parameters that will be called after a successful refresh
260260
func (azappcfg *AzureAppConfiguration) OnRefreshSuccess(callback func()) {
261+
if callback == nil {
262+
return
263+
}
264+
261265
azappcfg.onRefreshSuccess = append(azappcfg.onRefreshSuccess, callback)
262266
}
263267

0 commit comments

Comments
 (0)