Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Error when attempting live preview with CSS file using a base URL #3403

Closed
jasonsanjose opened this issue Apr 10, 2013 · 5 comments
Closed
Assignees
Milestone

Comments

@jasonsanjose
Copy link
Member

  1. Create a project, host it on a server, and specify a base url
  2. Open a CSS file in the project and open Live Preview
  3. See console output
Uncaught TypeError: Cannot read property 'file:///Users/jasonsj/Github/brackets/samples/root/Getting%20Started/main.css' of undefined LiveDevelopment/Agents/CSSAgent.js:70
styleForURL LiveDevelopment/Agents/CSSAgent.js:70
CSSDocument LiveDevelopment/Documents/CSSDocument.js:76
_createDocument LiveDevelopment/LiveDevelopment.js:318
_openDocument LiveDevelopment/LiveDevelopment.js:331
doLaunchAfterServerReady LiveDevelopment/LiveDevelopment.js:607
f.Callbacks.n jquery-1.7.min.js:2
f.Callbacks.o.add jquery-1.7.min.js:2
f.extend.Deferred.h.then jquery-1.7.min.js:2
open LiveDevelopment/LiveDevelopment.js:704
_handleGoLiveCommand LiveDevelopment/main.js:129
onGoLive LiveDevelopment/main.js:138
@jasonsanjose
Copy link
Member Author

Sprint 22 behavior is to look for an index.html in the same directory and open that URL in the browser. This change appears to come from 0ad0aa9 in pull #3218.

@redmunds
Copy link
Contributor

@jasonsanjose Should I back out that change? It's only affects the extension written by @jrowny but this seems worse.

@jasonsanjose
Copy link
Member Author

It's part @jrowny and part me from my fixes last night. We create the CSSDocument before the agents have loaded now. I'll have a fix soon.

@ghost ghost assigned jasonsanjose Apr 10, 2013
@pthiess
Copy link
Contributor

pthiess commented Apr 10, 2013

Added Sprint 23 label.

@redmunds
Copy link
Contributor

Since Jason fixed the bug, I'm closing it.

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

No branches or pull requests

3 participants