Skip to content

Commit

Permalink
Use addBookmark instead of addSite for bookmarks
Browse files Browse the repository at this point in the history
Fix brave#11033

We currently don't have DND under automated so no extra test coverage.

The js/dnd change is if you drag a bookmark from Chrome to Brave it was erroring with a JS error before instead of creating the bookmark.  Now it works.

This is a subset of a larger change that we needed for 0.18.x and 0.19.x
only.

Those changesets are:
582224d
48fee97

Auditors: @cezaraugusto
  • Loading branch information
bbondy authored and syuan100 committed Nov 9, 2017
1 parent 3cb44d8 commit 74e3ed8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/dnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ module.exports.prepareBookmarkDataFromCompatible = (dataTransfer) => {
let bookmark = dndData.getDragData(dataTransfer, dragTypes.BOOKMARK)
if (!bookmark) {
const dragData = dndData.getDragData(dataTransfer, dragTypes.TAB)
windowActions.onFrameBookmark(dragData.get('tabId'))
if (dragData) {
windowActions.onFrameBookmark(dragData.get('tabId'))
}
}
return bookmark
}

0 comments on commit 74e3ed8

Please sign in to comment.