Skip to content

Loading…

moved splittedFileName generation under file presence check #3

Merged
merged 1 commit into from

1 participant

@kashif-umair
Owner

Fixed a bug when data-file was not provided.

@kashif-umair kashif-umair merged commit d09ebd6 into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 7 additions and 0 deletions.
  1. +7 −0 gist-embed.js
View
7 gist-embed.js
@@ -12,13 +12,20 @@ $(function(){
line,
data = {};
+<<<<<<< Updated upstream
id = $elem.attr('id') || '';
file = $elem.attr('data-file');
line = $elem.attr('data-line');
splittedFileName = file.split('.').join('-');
+=======
+ id = $elem.attr('id') || '';
+ file = $elem.attr('data-file');
+ line = $elem.attr('data-line');
+>>>>>>> Stashed changes
if(file){
data.file = file;
+ splittedFileName = file.split('.').join('-');
}
//if the id doesn't begin with 'gist-', then ignore the code block
Something went wrong with that request. Please try again.