Skip to content

Commit 6489857

Browse files
committed
Handle case where component is null
1 parent 2ccd05b commit 6489857

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports.pitch = function(remainingRequest) {
3232
' }' + (query.name ? ', ' + JSON.stringify(query.name) : '') + ');',
3333
' },',
3434
' willTransitionFrom: function(transition, component, callback) {',
35-
' var componentClass = component.state ? component.state.component : null;',
35+
' var componentClass = component && component.state ? component.state.component : null;',
3636
' if (componentClass && componentClass.willTransitionFrom) {',
3737
' componentClass.willTransitionFrom(transition, component.refs["componentProxy"], callback);',
3838
' if (componentClass.willTransitionFrom.length < 3) {',

0 commit comments

Comments
 (0)