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

Fix live highlight when starting from a CSSDocument #8157

Merged
merged 4 commits into from
Jun 26, 2014

Conversation

marcelgerber
Copy link
Contributor

For #7453.
I wonder whether there's a nicer solution.

@redmunds
Copy link
Contributor

@SAplayer This looks like a pretty clean solution. Can you add a unit test for this case?

@redmunds redmunds self-assigned this Jun 24, 2014
var liveDoc = _createDocument(doc);
// The doc may already have an editor (e.g. starting live preview from an css file),
// so pass the editor if any
var liveDoc = _createDocument(doc, doc._masterEditor || undefined);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use doc._masterEditor || undefined. This can simply be doc._masterEditor.

@marcelgerber
Copy link
Contributor Author

@redmunds I tried to write tests for that particular functionality, but unfortunately I weren't able to.
I didn't find the right describe to use for the given circumstances.

@redmunds
Copy link
Contributor

@SAplayer There doesn't appear to be any mechanism for verifying highlighting, so that's OK. Triage complete.

@redmunds
Copy link
Contributor

Looks good. Merging.

redmunds added a commit that referenced this pull request Jun 26, 2014
Fix live highlight when starting from a CSSDocument
@redmunds redmunds merged commit 790b3f2 into adobe:master Jun 26, 2014
@marcelgerber marcelgerber deleted the live-preview-css-doc branch June 29, 2014 20:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants