Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoration is throwing exceptions #357

Closed
nathansobo opened this issue Jul 1, 2015 · 2 comments
Closed

Decoration is throwing exceptions #357

nathansobo opened this issue Jul 1, 2015 · 2 comments

Comments

@nathansobo
Copy link

Not quite sure why minimap is reusing the Decoration class from atom/atom. It would be better if it defined its own class since that's not a public API. That said, it looks like you're missing an implementation for decorationDidChange, which Decoration attempts to call during setProperties. As a result, we're seeing a lot of traces like the following showing up in our exception tracker.

TypeError Uncaught TypeError: undefined is not a function
    src/decoration.js:135:28 Decoration.module.exports.Decoration.setProperties
    src/decoration.js:58:12 new Decoration
    /Users/buddy/.atom/packages/minimap/lib/mixins/decoration-management.coffee:203:22 Minimap.module.exports.DecorationManagement.decorateMarker
    /Users/buddy/.atom/packages/minimap-highlight-selected/lib/minimap-highlight-selected-view.coffee:25:30 FakeEditor.(anonymous function) [as decorateMarker]
    node_modules/text-buffer/lib/text-buffer.js:842:9 TextBuffer.module.exports.TextBuffer.scanInRange
    src/text-editor.js:2095:26 TextEditor.module.exports.TextEditor.scanInBufferRange
    /Users/buddy/.atom/packages/minimap-highlight-selected/lib/minimap-highlight-selected-view.coffee:18:30 FakeEditor.(anonymous function) [as scanInBufferRange]
    /Users/buddy/.atom/packages/minimap-highlight-selected/lib/minimap-highlight-selected-view.coffee:68:14 MinimapHighlightSelectedView.handleSelection
    /Users/buddy/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1 MinimapHighlightSelectedView.handleSelection
    node_modules/event-kit/lib/emitter.js:82:11 Emitter.module.exports.Emitter.emit
    src/text-editor.js:2082:27 TextEditor.module.exports.TextEditor.selectionRangeChanged
    src/selection.js:877:26 Selection.module.exports.Selection.screenRangeChanged
    node_modules/event-kit/lib/emitter.js:82:11 Emitter.module.exports.Emitter.emit
    src/marker.js:270:27 Marker.module.exports.Marker.notifyObservers
    node_modules/event-kit/lib/emitter.js:82:11 Emitter.module.exports.Emitter.emit
    node_modules/text-buffer/lib/marker.js:400:20 Marker.module.exports.Marker.emitChangeEvent
    node_modules/text-buffer/lib/marker.js:345:12 Marker.module.exports.Marker.update
    node_modules/text-buffer/lib/marker.js:108:19 Marker.module.exports.Marker.setRange
    src/marker.js:137:32 Marker.module.exports.Marker.setBufferRange
    src/selection.js:906:7 Selection.module.exports.Selection.modifySelection
    src/selection.js:110:19 Selection.module.exports.Selection.setBufferRange
    src/selection.js:386:12 Selection.module.exports.Selection.selectWord
    src/text-editor-component.js:561:42 TextEditorComponent.module.exports.TextEditorComponent.onMouseDown
    src/text-editor-component.js:3:61 <anonymous>
@abe33
Copy link
Contributor

abe33 commented Jul 2, 2015

Yes, that's my mistake, I should have cloned the Decoration class from the start, I'll try to find some time today to fix this.

@abe33 abe33 closed this as completed in a20dde7 Jul 2, 2015
@nathansobo
Copy link
Author

Thanks @abe33!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants