| Summary: | TypeError loading folder view on directory that ends in ".js" | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Client | Assignee: | Project Inbox <orion.client-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ahunter.eclipse |
| Version: | 3.0 | ||
| Target Milestone: | 5.0 RC3 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Looks like this problem was solved sometime during 5.0, I am not seeing this issue. |
1. Create a top-level folder named "impress.js" 2. Click the folder href -- this loads the folder view on it. 3. A TypeError appears in the log: > "TypeError: Cannot call method 'getModel' of undefined" > TextStyler (textStyler.js:417) > createDefaultStyler (highlight.js:52) > createStyler (highlight.js:64) > SyntaxHighlighter.setup (highlight.js:140) > (anonymous function) (editorView.js:306) > (anonymous function) (EventTarget.js:43) > EventTarget.dispatchEvent (EventTarget.js:40) > objects.mixin._setInputContents (inputManager.js:476) > (anonymous function) (inputManager.js:191) > ... This is due to a flaw in our contentType-lookup logic, which uses the filename without checking if it's a directory first. Downstream listeners then assume they're dealing with a text editor, which is not the case. The page seems to work as normal despite the error.