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

Invalid hover request outside the range of the document causes an exception #22

Closed
rcjsuen opened this issue Mar 7, 2018 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Mar 7, 2018

import { ValidationSeverity } from 'dockerfile-utils';
import { DockerfileLanguageServiceFactory } from '../src/main';

const file = `from node`;
const service = DockerfileLanguageServiceFactory.createLanguageService();
service.computeHover(file, { line: 1, character: 2});
dockerHover.js:108
        for (let instruction of image.getInstructions()) {
                                      ^

TypeError: Cannot read property 'getInstructions' of null
    at DockerHover.computeHoverKey (dockerHover.js:108:39)
    at DockerHover.onHover (dockerHover.js:19:24)
    at LanguageService.computeHover (languageService.js:63:28)
    at Object.<anonymous> (bug.js:6:26)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
@rcjsuen rcjsuen added the bug Something isn't working label Mar 7, 2018
@rcjsuen rcjsuen self-assigned this Mar 7, 2018
@rcjsuen rcjsuen closed this as completed in 0a406d3 Mar 7, 2018
rcjsuen added a commit that referenced this issue Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant