Skip to content

Commit 5f905a1

Browse files
fixed broken commit to code, resolved issue and addressed new simpler logic.
1 parent 69e4e3c commit 5f905a1

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/com/magento/idea/magento2plugin/actions/generation/dialog/InjectAViewModelDialog.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,21 +141,16 @@ protected void onOK() {
141141
exit();
142142
return;
143143
}
144+
144145
if (targetBlockTag.getContainingFile() == null || targetBlockTag.getContainingFile().getParent() == null) {
145146
return;
146-
}
147+
} else {
147148
final String moduleName = GetModuleNameByDirectoryUtil.execute(
148149
targetBlockTag.getContainingFile().getParent(),
149150
project
150151
);
151-
targetBlockTag.getContainingFile().getParent() != null) {
152-
final String moduleName = GetModuleNameByDirectoryUtil.execute(
153-
targetBlockTag.getContainingFile().getParent(),
154-
project
155-
);
156-
} else {
157-
return;
158152
}
153+
159154
final NamespaceBuilder namespaceBuilder = new NamespaceBuilder(
160155
moduleName,
161156
getViewModelClassName(),

0 commit comments

Comments
 (0)