Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #86 from brave/fix/object-values
Browse files Browse the repository at this point in the history
polyfill Object.values for webkit browsers
  • Loading branch information
diracdeltas authored May 8, 2017
2 parents c775b0c + ebd7a1b commit 5017451
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ npm-debug.log*
pids
*.pid
*.seed
*.source.*.html

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
Expand Down
3 changes: 2 additions & 1 deletion client/recordUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ const mergeRecords = (recordsAndObjects) => {
objectIdMap[id] = recordAndObject
}
})
return Object.values(objectIdMap)
// webkit does not support Object.values
return Object.keys(objectIdMap).map((key) => objectIdMap[key])
}

/**
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"build": "yarn build-proto && browserify client/sync.js | uglifyjs - > bundles/bundle.js",
"build-proto": "pbjs --target=static-module lib/api.proto > lib/api.proto.js",
"browsertest": "yarn build-proto; yarn start-test; browserify test/client/*.js test/*.js | uglifyjs - | tape-run; exitCode=$?; yarn stop-test; exit $exitCode",
"browsertest-client": "yarn build-proto; yarn start-test; browserify test/client/*.js | tape-run --browser chrome; exitCode=$?; yarn stop-test; exit $exitCode",
"browsertest-chrome": "yarn build-proto; yarn start-test; browserify test/client/*.js | tape-run --browser chrome; exitCode=$?; yarn stop-test; exit $exitCode",
"browsertest-safari": "yarn build-proto; yarn start-test; browserify test/client/*.js | tape-run --browser safari; exitCode=$?; yarn stop-test; exit $exitCode",
"check": "nsp check",
"client": "yarn build && python -m SimpleHTTPServer",
"coverage": "NODE_CONFIG_DIR=server/config/ istanbul cover tape test/*.js test/server/**/*.js --report lcovonly -- -R spec",
Expand Down

0 comments on commit 5017451

Please sign in to comment.