Skip to content

Commit d1a5178

Browse files
committed
feat: update cookbook
1 parent 7e39add commit d1a5178

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/arc/04-cookbook/weather.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function(
4848
description = "Returns real-time weather information for any location",
4949
params = types(string("location", "a city to obtain the weather for."))
5050
) { (arg) ->
51-
val location = arg.toString() // Type conversion required, because arg can be any type depending on the params definition.
51+
val location = arg?.toString() // Type conversion required, because arg can be any type depending on the params definition.
5252
val locationSpecified = location != "unknown" && location?.isNotEmpty() == true
5353
val locationToUse = if (locationSpecified) location else memory("weather_location")
5454
if (locationToUse == null) {

0 commit comments

Comments
 (0)