Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
dtracers committed Jun 8, 2016
1 parent 5aab962 commit ec04927
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/main/js/protobufUtils/classCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ define([], function () {

var callParent = function () {
if (arguments.length >= 1) {
Parent.apply(this, Array.prototype.slice.call(arguments, 0));
Parent.apply(this, arguments);
} else {
Parent.apply(this);
}
Expand All @@ -48,7 +48,7 @@ define([], function () {
// special setting
this.superConstructor = parentConstructor;
// console.log('Setting parent constructor' + parent);
callParent.bind(this)(arguments);
callParent.bind(this).apply(this, arguments);
// console.log('Setting back to current constructor' +
// localConstructor);
this.superConstructor = localConstructor;
Expand All @@ -58,7 +58,7 @@ define([], function () {
* SuperConstructor.
*/
localScope.prototype.superConstructor = function () {
callParent.bind(this)(arguments);
callParent.bind(this).apply(this, arguments);
};
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/main/js/protobufUtils/sketchProtoConverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ define(['./../sketchLibrary/ProtoSketchFramework', // ProtoSketchFramework
throw new ProtobufDecodingException('Data type is not supported:' + typeof data);
}

if (protobufUtils.isUndefined(proto) || proto === null || typeof proto !== 'object') {
if (protobufUtils.isUndefined(proto) || proto === null) {
throw new ProtobufDecodingException('Proto is not a valid object:' + typeof proto);
}
try {
Expand Down Expand Up @@ -220,7 +220,7 @@ define(['./../sketchLibrary/ProtoSketchFramework', // ProtoSketchFramework
*/
var createNewSketch = function createNewSketch(id, x, y, width, height) {
var command = createBaseCommand(Commands.CommandType.CREATE_SKETCH, false);
var idChain = sketchUtil.IdChain();
var idChain = new sketchUtil.IdChain();
if (!protobufUtils.isUndefined(id)) {
idChain.idChain = [ id ];
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/main/js/sketchLibrary/SketchLibraryException.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ define(['stacktrace-js'], function (StackTrace) {
* @constructor
*/
function SketchLibraryException(message, cause) {

this.name = 'SketchLibraryException';
/**
* The level defines how bad it is. level 5 is the okayest exception
Expand All @@ -37,7 +36,7 @@ define(['stacktrace-js'], function (StackTrace) {
* of the the exception that occurred.
*/
this.setMessage = function(messageValue) {
this.specificMessage = messageValue;
this.message = messageValue;
};

/**
Expand Down

0 comments on commit ec04927

Please sign in to comment.