Skip to content

Commit

Permalink
Merge pull request #743 from TIBCOSoftware/fix-save-mapping
Browse files Browse the repository at this point in the history
Fix save is disable if updating object mapping.
  • Loading branch information
fcastill authored Apr 7, 2018
2 parents e389ed4 + a86f624 commit f825531
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
12 changes: 1 addition & 11 deletions src/client/flogo/flow/shared/mapper/utils/mapper-translator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,7 @@ function isInvalidMapping(mapping: IMapExpression) {
if (!expression || !expression.trim().length) {
return false;
}
let isInvalid = false;
if (mapping.mappingType === MAPPING_TYPE.OBJECT_TEMPLATE) {
try {
JSON.parse(expression);
} catch (e) {
isInvalid = true;
}
} else {
return !isValidExpression(expression);
}
return isInvalid;
return !isValidExpression(expression);
}

function isValidExpression(expression: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export class TaskConfiguratorComponent implements OnDestroy {
inputMappings: mappings
};
}

onIteratorValueChange(newValue: string) {
this.tabs.get('iterator').isValid = MapperTranslator.isValidExpression(newValue);
this.iterableValue = newValue;
Expand All @@ -125,14 +126,6 @@ export class TaskConfiguratorComponent implements OnDestroy {
this.checkIsIteratorDirty();
}

get isValid() {
return this.tabs.areDirty();
}

get isDirty() {
return this.tabs.areDirty();
}

save() {
const isIterable = this.iteratorModeOn && !_.isEmpty(this.iterableValue);
this._postService.publish(_.assign({}, PUB_EVENTS.saveTask, {
Expand Down

0 comments on commit f825531

Please sign in to comment.