Skip to content

Commit

Permalink
Ensure the component runs and don't replace UDIs on saving since its …
Browse files Browse the repository at this point in the history
…not necessary
  • Loading branch information
Shazwazza committed Sep 8, 2020
1 parent 98bda67 commit 6e2576f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/Umbraco.Web/Compose/BlockEditorComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ public void Initialize()

public void Terminate() => _handler?.Dispose();

private string ReplaceBlockListUdis(string rawJson, bool onlyMissingUdis) => ReplaceBlockListUdis(rawJson, null);
private string ReplaceBlockListUdis(string rawJson, bool onlyMissingUdis)
{
// the block editor doesn't ever have missing UDIs so when this is true there's nothing to process
if (onlyMissingUdis) return rawJson;

return ReplaceBlockListUdis(rawJson, null);
}

// internal for tests
internal string ReplaceBlockListUdis(string rawJson, Func<Guid> createGuid = null)
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web/Compose/BlockEditorComposer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ namespace Umbraco.Web.Compose
/// A composer for Block editors to run a component
/// </summary>
[RuntimeLevel(MinLevel = RuntimeLevel.Run)]
public class BlockEditorComposer : ComponentComposer<NestedContentPropertyComponent>, ICoreComposer
public class BlockEditorComposer : ComponentComposer<BlockEditorComponent>, ICoreComposer
{ }
}

0 comments on commit 6e2576f

Please sign in to comment.