Skip to content

Commit

Permalink
Data types are null when being created, defend legacy value converter…
Browse files Browse the repository at this point in the history
… from nulls
  • Loading branch information
callumbwhyte committed May 27, 2022
1 parent 64c8e6c commit 88cd766
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/).

## [2.0.3] - 2022-05-27
### Fixed
* Unable to create new Meganav properties due to null data type

## [2.0.2] - 2022-05-23
### Fixed
* `meganav-card` styles breaking backoffice minification
Expand Down Expand Up @@ -58,7 +62,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this
### Added
* Initial release of Meganav for Umbraco 7.5

[Unreleased]: https://github.com/callumbwhyte/meganav/compare/release-2.0.2...HEAD
[Unreleased]: https://github.com/callumbwhyte/meganav/compare/release-2.0.3...HEAD
[2.0.3]: https://github.com/callumbwhyte/meganav/compare/release-2.0.2...release-2.0.3
[2.0.2]: https://github.com/callumbwhyte/meganav/compare/release-2.0.1...release-2.0.2
[2.0.1]: https://github.com/callumbwhyte/meganav/compare/release-2.0.0...release-2.0.1
[2.0.0]: https://github.com/callumbwhyte/meganav/tree/release-2.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ private void DataTypeService_Saving(IDataTypeService sender, SaveEventArgs<IData
{
var existingEntity = sender.GetDataType(x.Id);

return existingEntity?.EditorAlias != Constants.PropertyEditorAlias && LegacyEditors.Aliases.Any(existingEntity.EditorAlias.InvariantContains);
return existingEntity != null
&& existingEntity.EditorAlias != Constants.PropertyEditorAlias
&& LegacyEditors.Aliases.Any(existingEntity.EditorAlias.InvariantContains);
});

foreach (var dataType in dataTypes)
Expand Down

0 comments on commit 88cd766

Please sign in to comment.