Permalink
Browse files

To Underscore.js support

  • Loading branch information...
1 parent 7ce5ea6 commit b7277a8c094c218e00f9c8e24bc568ef6a2cf93d @tekreme73 tekreme73 committed Feb 3, 2015
Showing with 4 additions and 4 deletions.
  1. +4 −4 JavaCodeGenerator.js
@@ -464,7 +464,7 @@ define(function (require, exports, module) {
// Modifiers
var _modifiers = this.getModifiers(elem);
- if (_modifiers.indexOf("abstract") === -1 && _.some(elem.operations, function (op) { return op.isAbstract === true; })) {
+ if ( _.contains(_modifiers, "abstract") !== true && _.some(elem.operations, function (op) { return op.isAbstract === true; })) {
_modifiers.push("abstract");
}
if (_modifiers.length > 0) {
@@ -526,7 +526,7 @@ define(function (require, exports, module) {
if (_extends.length > 0) {
for (i = 0, len = _extends[0].operations.length; i < len; i++) {
_modifiers = this.getModifiers(_extends[0].operations[i]);
- if( _modifiers.indexOf("abstract") !== -1 ) {
+ if( _.contains(_modifiers, "abstract") === true ) {
this.writeMethod(codeWriter, _extends[0].operations[i], options, false, false);
codeWriter.writeLine();
}
@@ -698,7 +698,7 @@ define(function (require, exports, module) {
// Modifiers
var _modifiers = this.getModifiers(elem);
- if (_modifiers.indexOf("abstract") === -1 && _.some(elem.operations, function (op) { return op.isAbstract === true; })) {
+ if (_.contains(_modifiers, "abstract") !== true && _.some(elem.operations, function (op) { return op.isAbstract === true; })) {
_modifiers.push("abstract");
}
if (_modifiers.length > 0) {
@@ -729,7 +729,7 @@ define(function (require, exports, module) {
if (_extends.length > 0) {
for (i = 0, len = _extends[0].operations.length; i < len; i++) {
_modifiers = this.getModifiers(_extends[0].operations[i]);
- if( _modifiers.indexOf("abstract") !== -1 ) {
+ if(_.contains(_modifiers, "abstract") === true) {
this.writeMethod(codeWriter, _extends[0].operations[i], options, false, false);
codeWriter.writeLine();
}

0 comments on commit b7277a8

Please sign in to comment.