Skip to content

Commit d631039

Browse files
author
Stephan
committed
U4-4928 - issue with missing media content properties
1 parent 95b9a46 commit d631039

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Umbraco.Web/Models/PublishedContentBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public virtual string Url
4747
var prop = GetProperty(Constants.Conventions.Media.File);
4848
if (prop == null)
4949
throw new NotSupportedException("Cannot resolve a Url for a media item when there is no 'umbracoFile' property defined.");
50-
_url = prop.Value.ToString();
50+
_url = prop.Value == null ? "" : prop.Value.ToString();
5151
break;
5252
default:
5353
throw new NotSupportedException();

0 commit comments

Comments
 (0)