projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
INFRA-132 - js/angular-crmCaseType.js - Cleanup empty checks to satisfy jshint
[civicrm-core.git]
/
js
/
angular-crmCaseType.js
diff --git
a/js/angular-crmCaseType.js
b/js/angular-crmCaseType.js
index 0caf0fa15363aee2d7cfaf87b86412690166784b..dcf752a08f94fb554d384339efcea71cc310e860 100644
(file)
--- a/
js/angular-crmCaseType.js
+++ b/
js/angular-crmCaseType.js
@@
-230,7
+230,7
@@
case 'timeline':
return true;
case 'sequence':
case 'timeline':
return true;
case 'sequence':
- return 0 == _.where($scope.caseType.definition.activitySets, {sequence: '1'}).length;
+ return 0 ==
=
_.where($scope.caseType.definition.activitySets, {sequence: '1'}).length;
default:
CRM.console('warn', 'Denied access to unrecognized workflow: (' + workflow + ')');
return false;
default:
CRM.console('warn', 'Denied access to unrecognized workflow: (' + workflow + ')');
return false;
@@
-279,7
+279,7
@@
$scope.save = function() {
var result = crmApi('CaseType', 'create', $scope.caseType, true);
result.success(function(data) {
$scope.save = function() {
var result = crmApi('CaseType', 'create', $scope.caseType, true);
result.success(function(data) {
- if (data.is_error ==
0
) {
+ if (data.is_error ==
= 0 || data.is_error == '0'
) {
$scope.caseType.id = data.id;
window.location.href = '#/caseType';
}
$scope.caseType.id = data.id;
window.location.href = '#/caseType';
}