Skip to content

Commit

Permalink
Merge pull request #434 from VirtualFlyBrain/feature/218
Browse files Browse the repository at this point in the history
fixes clearall bug in focusterm
  • Loading branch information
ddelpiano authored Oct 20, 2019
2 parents 1b9506a + f1ea28e commit 8e1a69a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ before_install:
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
- export TAG=`if [ "$BUILD_TYPE" == "development" ]; then echo "$TAG-development"; else echo "$TAG"; fi`
install:
- npm install jest@24.8.0 puppeteer@1.17.0 jest-puppeteer@3.9.0 babel-preset-env@1.6.0 url-join@4.0.0
- npm install jest@24.8.0 puppeteer@1.17.0 jest-puppeteer@4.3.0 @babel/preset-env@7.4.5 url-join@4.0.0 @babel/core@7.4.5
before_script:
- docker pull metacell/java-virgo-maven:development || true
script:
Expand Down
8 changes: 8 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{ targets: { node: 'current' } },
],
],
};
5 changes: 5 additions & 0 deletions components/interface/FocusTerm.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ export default class FocusTerm extends React.Component {
window.addVfbId(window[window.templateID].getId());
if (Instances[i].parent != null) {
Instances[i].parent.delete();
// Delete instance too after deleting parent
if (Instances[i] != null) {
Instances[i].delete()
}
} else {
Instances[i].delete()
}
i = i - 1; // Since an array element has been deleted, index is updated too
}
}
}
Expand Down
1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module.exports = {
"preset": "jest-puppeteer",
"moduleDirectories": ["node_modules", "node_modules"],
"testRegex": "(/tests/jest/vfb/.*|(\\.|/)(test|spec))\\-tests.[jt]sx?$"
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"repository": "http://git.geppetto.org",
"license": "MIT",
"scripts": {
"test": "jest --verbose",
"prebuild": "eslint . --color",
"build": "webpack -p --progress",
"prebuild-dev": "eslint . --color",
Expand Down

0 comments on commit 8e1a69a

Please sign in to comment.