Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit 4ee5b59

Browse files
committed
Merge branch 'develop' of https://github.com/skttl/umbraco-doc-type-grid-editor into develop
2 parents d211de9 + 1d59a36 commit 4ee5b59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@
151151

152152
$scope.setPreview = function (model) {
153153
if ($scope.control.editor.config && "enablePreview" in $scope.control.editor.config && $scope.control.editor.config.enablePreview) {
154-
var activeVariant = editorState.current.variants.find(v => v.active);
155-
var culture = activeVariant ? activeVariant.language.culture : null;
154+
var activeVariant = editorState.current.variants?.find(v => v.active);
155+
var culture = activeVariant?.language?.culture;
156156
dtgeResources.getEditorMarkupForDocTypePartial(editorState.current.id, model.id,
157157
$scope.control.editor.alias, model.dtgeContentTypeAlias, model.value,
158158
$scope.control.editor.config.viewPath,

0 commit comments

Comments
 (0)