Skip to content

Conversation

@Peripheral1994
Copy link
Contributor

As currently written, Facade.library() will crash when called from Facade.device() if options.library is an object without a name property. This is because we will pass over both of the if statements in Facade.library() and attempt to run .indexOf() inside of Facade.device() on either an object literal or undefined.

This adds validation to ensure that library.name exists and is a string.

As currently written, Facade.library() will crash when called from Facade.device() if options.library is an object without a name property. This is because we will pass over both of the if statements in Facade.library() and attempt to run .indexOf() inside of Facade.device() on either an object literal or undefined.

This adds validation to ensure that library.name exists and is a string.
@codecov-io
Copy link

Codecov Report

Merging #113 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
+ Coverage   99.21%   99.21%   +<.01%     
==========================================
  Files          12       12              
  Lines         507      508       +1     
  Branches      162      163       +1     
==========================================
+ Hits          503      504       +1     
  Misses          4        4
Impacted Files Coverage Δ
lib/facade.js 99.18% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 448d4a6...ba82dc8. Read the comment docs.

Copy link

@Flaque Flaque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CarlosMecha CarlosMecha changed the title Change Facade.library() logic [PLATFORM-2992] Change Facade.library() logic Jul 31, 2018
@CarlosMecha
Copy link

CarlosMecha commented Jul 31, 2018

Please do not merge this PR until PLATFORM-2992 gets scheduled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants