Skip to content

Commit

Permalink
handle missing options in Engine.create
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Apr 19, 2016
1 parent d373172 commit f36fe2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ var Body = require('../body/Body');
* @return {engine} engine
*/
Engine.create = function(element, options) {

// options may be passed as the first (and only) argument
options = Common.isElement(element) ? options : element;
element = Common.isElement(element) ? element : null;

options = options || {};

var defaults = {
positionIterations: 6,
Expand Down

0 comments on commit f36fe2c

Please sign in to comment.