-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Cleaner fix for LiveDevMultiBrowser infinite loop #10207
Conversation
…ix-LiveDevMultiBrowser-loop * commit 'bb4f4d0fdaae509cafd467364947717f0c70cb4d': LiveDevMultiBrowser should properly search parent directories for an index.html.
…iveDevelopment.js, moving shared code to FileUtils with unit tests. Also... - fixes an unhit edge case in getParentFolder() (now getParentDirectory()) that behaves differently across platforms - removes duplicate copy of getFilenameWithoutExtension() in LiveDevelopment.js (copy in FileUtils was identical) - add/fix some unit tests for two existing FileUtils APIs
@@ -715,14 +705,14 @@ define(function LiveDevelopment(require, exports, module) { | |||
} | |||
|
|||
var filteredFiltered = allFiles.filter(function (item) { | |||
var parent = getParentFolder(item.fullPath); | |||
var parent = FileUtils.getParentDirectory(item.fullPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think getParentDirectoryPath
is cleaner to indicate it returns a string (and analogous to getDirectoryPath
).
LGTM, just the comment on the function name and nit on the suite name. |
Works for me. Thanks a lot @peterflynn and @busykai. I'll close my PR. |
1d7aa43
to
f044e44
Compare
@busykai Oops, sorry -- somehow I accidentally pushed a draft that didn't have my final changes committed. The actual changes in my real commit (should be up there now) doesn't have either of the issues you mentioned. (I used the API name |
@peterflynn, thanks! This looks good to me. Just some manual testing and will merge it. The tests are clean. |
Excellent, thanks! |
Merging. |
Cleaner fix for LiveDevMultiBrowser infinite loop
This is for #10193. See discussion here for context: #10192 (comment).
Move shared code into FileUtils (with unit tests) to minimize diff in the
_getInitialDocFromCurrent()
code that is duplicated between the two Live Preview impls.Also...