diff --git a/src/Our.Umbraco.LinkedPages/Controllers/LinkedPagesApiController.cs b/src/Our.Umbraco.LinkedPages/Controllers/LinkedPagesApiController.cs index 9b54ca3..1d4cab5 100644 --- a/src/Our.Umbraco.LinkedPages/Controllers/LinkedPagesApiController.cs +++ b/src/Our.Umbraco.LinkedPages/Controllers/LinkedPagesApiController.cs @@ -80,7 +80,8 @@ public IEnumerable CreateLink(int parent, int child) if (parentNode == null || childNode == null) throw new KeyNotFoundException(); - var typeAlias = _config.RelationType ?? defaultRelationType; + var typeAlias = string.IsNullOrWhiteSpace(_config.RelationType) ? + defaultRelationType : _config.RelationType; var relationType = _relationService.GetRelationTypeByAlias(typeAlias); if (relationType == null) throw new ApplicationException($"Cannot create relation of type {typeAlias}");