Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit 0864c38

Browse files
Refactoring to jshint standards
1 parent 597b677 commit 0864c38

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

‎main.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ define(function (require, exports, module) {
1515
var patterns = {
1616
directive: /\.directive\(['"]([a-zA-Z-]+)['"]/g,
1717
controller: /\.controller\(['"](\w+)['"]/g
18-
}
18+
};
1919

2020
/**
2121
* Return the token string that is at the specified position.
@@ -176,13 +176,14 @@ define(function (require, exports, module) {
176176

177177
// Always use the selection start for determining the function name. The pos
178178
// parameter is usually the selection end.
179-
var directiveName, controllerName;
179+
var directiveName = _getDirectiveName(hostEditor, sel.start),
180+
controllerName = _getControllerName(hostEditor, sel.start);
180181

181-
if (controllerName=_getControllerName(hostEditor,sel.start)) {
182-
return _createInlineEditor(hostEditor, _getControllerName(hostEditor,sel.start),patterns.controller);
182+
if (controllerName) {
183+
return _createInlineEditor(hostEditor, controllerName,patterns.controller);
183184
}
184185

185-
if (directiveName=_getDirectiveName(hostEditor,sel.start)) {
186+
if (directiveName) {
186187
return _createInlineEditor(hostEditor, directiveName, patterns.directive);
187188
}
188189

@@ -191,4 +192,4 @@ define(function (require, exports, module) {
191192

192193
// init
193194
EditorManager.registerInlineEditProvider(provider);
194-
});
195+
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /