Procházet zdrojové kódy

Fix demo require path

John Lees-Miller před 6 roky
rodič
revize
90494fd75f
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      libraries/o-error/doc/demo.js

+ 2 - 2
libraries/o-error/doc/demo.js

@@ -1,5 +1,7 @@
 // This is the code from the README.
 // This is the code from the README.
 
 
+const OError = require('..')
+
 const demoDatabase = {
 const demoDatabase = {
   findUser(id, callback) {
   findUser(id, callback) {
     process.nextTick(() => {
     process.nextTick(() => {
@@ -36,8 +38,6 @@ sayHi1(43, (err, result) => {
   }
   }
 })
 })
 
 
-const OError = require('.')
-
 function sayHi2(userId, callback) {
 function sayHi2(userId, callback) {
   demoDatabase.findUser(userId, (err, user) => {
   demoDatabase.findUser(userId, (err, user) => {
     if (err) return callback(OError.tag(err))
     if (err) return callback(OError.tag(err))