-
Notifications
You must be signed in to change notification settings - Fork 232
Bug fix 1389239 - Hang due to undefined object when no storage class … #749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -78,7 +78,7 @@ angular.module('openshiftConsole') | |||
var unit = $scope.claim.unit || "Mi"; | |||
pvc.spec.resources.requests.storage = $scope.claim.amount + unit; | |||
pvc.spec.selector.matchLabels = keyValueEditorUtils.mapEntries( keyValueEditorUtils.compactEntries($scope.claim.selectedLabels) ); | |||
if ($scope.claim.storageClass !== null) { | |||
if ( typeof($scope.claim.storageClass ) !== "undefined" && $scope.claim.storageClass !== null ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we simply check
if ($scope.claim.storageClass) { ... }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spadgett - that still does not seem to handle the undefined case which occurs when the user chooses no storage class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When $scope.claim.storageClass
is undefined, that if
will evaluate to false.
@spadgett - On further testing, that does work for all cases. Code updated. Thanks. |
[merge] |
Evaluated for origin web console merge up to cd83986 |
Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/590/) (Base Commit: 8fa3e93) |
Hang due to undefined object when no storage class is selected