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

Commit

Permalink
Use a variable to store the language ID so that we don't have to call…
Browse files Browse the repository at this point in the history
… the same functions multiple times when checking it.
  • Loading branch information
RaymondLim committed Sep 5, 2013
1 parent b4a64f9 commit 904714f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extensions/default/WebPlatformDocs/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ define(function (require, exports, module) {
* @return {?$.Promise} resolved with an InlineWidget; null if we're not going to provide anything
*/
function inlineProvider(hostEditor, pos) {
var langId = hostEditor.getLanguageForSelection().getId();
// Only provide docs when cursor is in CSS content
if (hostEditor.getLanguageForSelection().getId() !== "css" &&
hostEditor.getLanguageForSelection().getId() !== "scss") {
if (langId !== "css" && langId !== "scss") {
return null;
}

Expand Down

0 comments on commit 904714f

Please # to comment.