Skip to content

Commit ea8cfd5

Browse files
authored
Merge pull request #13 from thinkthroughmath/MATH-7883-parent-is-not-defined-error
MATH-7883 - TypeError - Parent is not defined
2 parents 6bebd19 + 491dbc2 commit ea8cfd5

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

dist/ttm-coffeescript-math.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2065,7 +2065,9 @@ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ?
20652065
_ExpressionManipulator.prototype.withComponent = function(position, fn) {
20662066
var comp;
20672067
comp = this.traversal.build(this.expr).findForID(position.position());
2068-
fn(comp);
2068+
if (comp) {
2069+
fn(comp);
2070+
}
20692071
return this;
20702072
};
20712073

dist/ttm-coffeescript-math.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ttm-coffeescript-math",
3-
"version": "0.3.6",
3+
"version": "0.3.7",
44
"description": "TTM CoffeeScript Math",
55
"homepage": "https://github.com/thinkthroughmath/ttm-coffeescript-math",
66
"dependencies": {

src/math/expression_manipulation.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class _ExpressionManipulator
8181
withComponent: (position, fn)->
8282
comp = @traversal.build(@expr).
8383
findForID(position.position())
84-
fn(comp)
84+
fn(comp) if comp
8585
@
8686
value: -> @expr
8787

0 commit comments

Comments
 (0)